Application Calling Fortran Exe

Nov 18, 2010

I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process). If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed. We want same behaviour but want to run fortran exe from .net application, If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application? Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged. [code]

View 1 Replies


ADVERTISEMENT

Calling Fortran DLL Program?

May 11, 2011

have problem with calling a Fortran DLL from VB.net Program. The VB program provide the GUI while the Fortran DLL does the calculations.The Fortran DLL opens and reads from data files supplied by the VB program. however, DLL program displays a message that says it can not open the file.

View 1 Replies

AccessViolationException Was Unhandled - Calling Fortran Dll

May 27, 2010

I have a subroutine that was written in fortran that I need to call from VB.NET where all of my other functions are written. I did not write the fortran, and hardly know fortran. I am getting the below exception on my dll function call and don't know how to fix it. I wonder if it is due to incongruent variable lengths? I have the source for my fortran and compiled it using the g95 compiler. I have tried compiling it with a flag on which is supposed to force all of the reals to 32 bits (-r4). It weirds me out that you don't seem to be required to initialize variables before use in fortran. I thought it was supposed to be a ridged language.

[Code]...

View 2 Replies

Calling Fortran DLL From VB (Character Strings)

Jul 14, 2011

I am trying to call a fortran DLL from VB.NET. Fortran function requires two character strings to be passed from VB to fortran. I am able to run the code with a change after receiveing a AccessViolationException error. I dont understand why it worked can
some one whose professional explain me the difference. Here I am attaching the codes for reference

[Code]...

View 1 Replies

Calling Fortran DLL, Cannot Work In The Loop

Jan 15, 2010

I am calling a Fortran dll from vb.net. It works when I call it it one time only. When I put that in a loop, it works for the first time and second time it quits the program. How can I run this in a loop?

View 4 Replies

Write Fortran Or To Integrate Fortran To VB 2010?

Nov 7, 2011

I was wondering if there was a way to write fortran or to integrate fortran to Visual Basic .net 2010..Maybe with adding a refferance or something? what options are available?

View 5 Replies

VS 2008 : Calling A Fortran .exe That Calls A File - File Not Found?

Jul 6, 2010

I am trying to run a fortran .exe in VB with the Shell() command. The fortran .exe, when ran, it asks you for a file name. It works perfectly on it's own, but when I try calling it through VB Shell(), it does not work.. (i.e. I cannot get VB to get the file name in it.)

Added info:I am using VB9 but I'm writing in compatibility to .NET. As for the Fortran .exe, when you call it, it opens a command window where it asks for a file name (which I got as a string in VB and I'm trying to pass it in), then you press Enter and it's done. Basically the .exe takes a text file and creates a new text file. We've also tried adding & mystring when calling the exe, but it gives a "file not found" error.

View 3 Replies

VS 2005 Run Fortran Exe From .net Application?

Nov 18, 2010

I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process).If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed.We want same behaviour but want to run fortran exe from .net application,If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application?

Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged.Below is the error forrtl: error (200): program aborting due to window-CLOSE event Image PC Routine Line[code]....

View 1 Replies

PInvokeStackImbalance Error In Fortran DLL Called .NET Application?

May 17, 2011

I really need help with this. I am trying to call a fortran DLL from VB.NET program. The program works fine untill it reaches the end of the DLL program where, instead of transferring the control back to the calling program the message " PinvokeStackImbalance error" is displayed and program halts. If I turn off pInvokeStackImbalance from the Debug menu, then the program will compile without problem. However, the .EXE program crash after the DLL call. Does anybody where the problem is. following the VB.Net program that calls the fortran DLL:

Private
Declare Sub
WIDTH_SUB Lib

[code]....

View 5 Replies

C# - Calling A Method In A FACTORY Class When Application Is Closed / Disposed Without Using Application's Dispose() Method

Mar 28, 2012

I am indifferent if you are a VB.NET or C# or other .NET developer. I have a FACTORY class like the following:

[Code]...

View 2 Replies

.NET Application Hangs When Calling DLL

Dec 28, 2010

Its been running in production for over a year and this is the first time I saw this behaviour. The application is a VB.NET Console Application which is triggered by MQ server. This application uses a class library which is part of the same project(Say 'abc.dll'). In production around 40+ instances of this exe are running and all of them use the some of the functions from 'abc.dll'.

Last week, we noticed that all the 40 instances were shown to be running in the task manager but they were not doing any activity. There was no exception thrown or error logged in Application logs or System logs. To frantically debug the problem, I tried isolating the problem.

With all these 40+ exes hung up, I wrote a small aplication which would use a reference to this 'a.dll', create an object of one of the classes in that dll and execute a method in there. I was printing console.writelines in between to see to which point it gets to before erroring out.

To my surprise, I found that at the point where I was creating an object of a class in 'a.dll' this sample test application would also hang just like the others. No exceptions thrown. So I killed all those applications as a last resort and then when I restarted all of them, everything worked fine.

I couldn't find any explanation for this behaviour. Since it was a critical error affecting a production system(blanking out the application for 3+ hours), I have to give a very good explanation as to why this would occur. how it can be prevented in future.

(Side note: the servers running these appilcation do not have a maintenance schedule and are supposed to be up for couple of months together.

View 11 Replies

Calling Another Application From Within A VB Program?

Feb 9, 2011

I have written a VB Program for calculating Power requirements for Heating Water, Air etc. There are some standard formulae, which require inputs in fixed units. The user may have data in other units, which will then need conversion.Example: Formula needs Airflow in Cubic Meters/ Minute, where as user has data in Liters/Second.I do not want to write code to do Unit Conversions from within my Program. There are readily available FREE Applications for doing the conversions. I have one such Application, which I want to bundle with my VB program.How can I Code in my program, so that when the user clicks a Button " Unit Conversion ", the bundled program will open.This is like clicking on a Hyperlink in a Program or Document and a Web Browser opens.

View 1 Replies

Calling Asp.net Function Within Web Application?

Oct 26, 2011

Is it possible to call a function within an asp.net web application from outside that application e.g. with VB.net? If so it would be great to see a hello world type example.

For arguments sake lets say I have my function "helloworld" in a class file within web application: [URL]

My ultimate goal is to enable some reliable / robust scheduling of functions within asp.net. I have read multiple examples about using web services / custom services running on the server etc but I don't really get the implementation.

View 2 Replies

Calling IBM UniVerse Application?

Dec 9, 2010

I have developed IBM UniVerse application before. Now I am developing a .NET application that I want to call the UniVerse application?

View 1 Replies

Calling JS Function From Application?

Jul 6, 2009

I am working on an desktop application in which I am using WEB BROWSER component. There is a Javascript function within the webpage I want to call from my vb.net application. I am not attaching any code with this post because I couldn't find anything relevant on internet as all example involve asp.net server controls, no VB.Net desktop Application example.

way out to call JS function of the webpage loaded in the browser component through VB.Net Form Button.

View 1 Replies

Get GUID From Calling Application?

Nov 29, 2010

I have multiple applications that will be calling a DLL.Is there a way to get the GUID from the calling application without passing it?I would like to use the GUID to verify the parent application and open up rights within the DLL for a specific app but not others.

View 3 Replies

Link Vb To FORTRAN?

Oct 5, 2006

I have several subroutines which are written in FORTRAN.

1) how I need to compile the FORTRAN subroutines?

2) what I need to do within VB 2005 to call these FORTRAN subroutines within the VB 2005 code?

View 1 Replies

Calling A Method From .dll Globally In C# Application

Aug 26, 2009

I am using a .dll called Kiosk in my application which is resonsible for disabling some keyboard keys. I am doing like this... using Kiosk; public static Kiosk.Kiosk KIOSK = new Kiosk.Kiosk();

[Code]...

View 2 Replies

Calling Some Default Windows Application

Jun 3, 2011

If I wanted to call the RUN prompt and the Command prompt in my application, what exe's would I need to reference?

View 6 Replies

Passing Argument To Or From A FORTRAN DLL From .NET?

Feb 1, 2010

I have a DLL written in fortran that I know works because I am getting it from a working software package that we use daily. I am trying to call it from anything but am having problems i believe with passing the correctly formatted arguments in and out of it, so i decided to try and access it from a VB program. I chose VB because I have contacted the developer of the software package we are using and he gave me his DLL function call in VB6, even though he is not allowed to show me the FORTRAN source.

Problem is (perhaps, i think) that I am writing in VB.NET, which has different data types than VB6. Can anyone see why i am am having problems. The error i get upon running is: "AccessViolationException was unhandled: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

[Code]...

View 3 Replies

.net - Calling New StackTrace Blocks When Closing Application

Sep 12, 2011

I just did some analysis by using a global function which is called GetCallingMethod in my case.

Mostly it works great. But some cases the application is blocked. It is blocked when closing the application. When going to "pause" in Visual Studio, it stays on the new StackTrace line forever.

In my application I am using third party references, multithreading and several classes. But all that should not be a problem and should not lock the tracer class as far as I imagine. I am using Visual Studio 2010 Ultimate in this case.

This line will never be left in development area. Application will is frozen. Try/Catch will not force the procedure.

View 1 Replies

Application Crashes When Calling Embedded Resources?

Jul 3, 2009

I'm writing a console application in Visual Basic 2008 Express. I added several text files to my project as resources. Specifically... I went to my project's "Properties" page and selected the "Resources" tab. I clicked the "Add Resource" dropdown and chose "Add New Text File". I entered some simple text and saved the file as "Welcome.txt". I built the entire solution.n my code, I use console.writeline(My.Resources.Welcome) to display the text

View 1 Replies

Calling A Function That's In A Module In External Application

May 25, 2012

I have an application (app.exe) that has a VB Module in its source code (Module1). The module has a function called Function1. I need to call this function from another application. The module is not marked as public, so adding a reference to app.exe won't work. I'm trying to use reflection (Assembly.LoadFrom()) but unless I'm way off base, the module would have to be a class in order for me to get an instance of it.

Please nobody ask me "what have you tried?" I tried a million different things and let's just say "none of them work." So I'm looking for someone that has specific experience with doing exactly what I'm trying to do. If you don't have that experience, please move on to the next question and ignore mine.

View 1 Replies

Calling Another Application And Activating Its Menu Click?

Nov 2, 2006

it is possible to code to a call another application and activate its "Tool" menu click.I am enclosing sample exe (this is the application that has to be called; and its "Tool" menu has to be acitivated, which fires a messagebox event")

View 39 Replies

Calling Javascript Function From Within Desktop Application?

Jun 24, 2009

I'm trying to do something which i am not sure is possible, im hoping someone will be able to prove me wrong.I have a desktop application written in VB .net which needs to post to google analytics, the interface they provide is javascript based. At the moment my application opens an internet browser, goes to a specified URL which in turn executes the javascript contained within, this is cludgey and memory gobling!

Is there any way of importing a javascript file and calling a javascript function without opening a third party browser? would preferably not want to use the browser control either.Is there a way of instantiating for instance a javascript engine and passing it the commands?

View 2 Replies

VB: Get Compiled DLL's Calling Application Info; COM Security?

Oct 15, 2010

Through COM, one can potentially gain absolute control over a target system. For example: using javascript's ActiveXObject object in IE, one can create certain objects which were designed to have direct access or interaction with system properties and files.One would think common sense dictates users disable ActiveX features in IE immediately after installing the browser to ensure their system is protected while surfing the net, or at least paying close attention to which websites they permit. But, I doubt many average PC users know how or why to do this, or just get tired of mirco-managing it over time. I think any PC user or admin my COM class caters to would greatly appreciate not having to deal with that. Thankfully it looks like IE versions come packaged with ActiveX disabled by default nowadays.

I've built a very versatile COM class library in VB. I didn't intend for it to be callable from any website, but that feature is just part of the COM platform. I'd like to prevent the library from being called from IE unless the website is on a white-listed domain to proactively protect the user (and ultimately their entire intranet) from harm from malicious websites. What would be the best method in VB.Net to tell which application called my DLL, to be able to tell if it was called from any command or process originating from IE? And, what domain called my dll? System.Environment.GetCommandLineArgs()(0) gets me the calling application path. With this info, I can compare it to a black/white-list of applications.

View 2 Replies

Closing Exe (including A Fortran Dll) After Executing?

Apr 20, 2010

I have 2 source codes in fortrran (I have not written them). I visualized these codes by linking them to VB2005.when I excuate the VB.exe, when VB calls one of these DLLs, there is no problem, but in calling the other DLL, the DLL is executed but the VB.exe is closed and the interface page to the user goes out.

View 1 Replies

Pass A String From VB 2010 To A Fortran DLL?

Aug 3, 2011

I can pass integers, singles, doubles, and arrays of all these back and forth with no problem. But I can't figure out how to pass a string in Visual Basic 2010 to a character variable in the Fortran DLL. I keep getting the PInvokeStackImbalance error. I could just convert the Visual Basic string to an integer array containing the ASCII code for each character, send that, and convert back inside the DLL, but that's pathetic. There must be a simple way to do this.

I first tried using Dim txt(50) as Char in VB2010, and character*50 txt in the DVF F90 DLL but that didn't work.

Then I tried Dim txt as String in Visual Basic 2010 and made the string 50 characters long (also tried 49) but this didn't work.

View 2 Replies

Passing Structures As Arguments For A Fortran DLL?

Sep 11, 2010

I could pass a User Defined Type data structure to a Fortran DLL, that contained Short Integers, Singles (real variables) and a series of Fixed Arrays, both short integers and real variables.I am upgrading my VB6 app to Visual Studio 2008 - VB, and I want to keep the same data structures as they are used in about 300,000 lines of code.I modified the Data Structure as follows below, making sure it is of Explicit Layout, since I want the position of all variables to be the same both in VS 2008 and Fortran.Two problems arise:

1) if the LayoutKind is Explicit, such as in the example below (only part of the data structue is shown, where "..." indicate part of omitted data structure members), whenever I try to run my app, I get the following exception message, which indicates that the VBFixedArray declared at Offset 154 is in conflict with some other object, unnamed by the exception handler.

Message="Could not load type 'MyApp.SomeStruct' from assembly 'MyApp, Version=1.32.3906.33480, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 154 that is incorrectly aligned or overlapped by a non-object field."

Source="MyApp"
TypeName="MyApp.SomeStruct"
StackTrace:[code]....

2) if the LayoutKind is Sequential, the app will start, all the data preceding the VBFixedArrays is passed to the Fortran Dll without problem; everything that follows the VBFixedArray is garbled and unusable. To check this, I have made a Fortran subroutine in the Dll to which I pass both the Data Structure and a vector; in the Fortran subroutine, all the elements of the data structure are equivalenced to individual positions in the vector; upon return from the Fortran subroutine, I compare the elements of the data structure and those of the vector.

The problem here is that the Data Structure contains some 1300 names, and is used extensively in the application, as it is the way to pass elegantly a lot of data pertaining to a mathematical model with only one adress when accessing the Fortran Dll, in which the computing engine lies.

<StructLayout
<StructLayout(LayoutKind.Explicit, Size := 9226, CharSet := CharSet.Ansi)>
Public Structure SomeStruct[code]......

View 5 Replies

VS 2008 : Run A Fortran Executable From A VB Form?

Nov 18, 2009

My challenge is to prepare for a presentation using a GUI interface to access a program written in Fortran.The Fortran program reads a data file and then writes an output file.For the presentation I need to be able to change a variable value in a VB form, update the data file, and run the Fortran program from the VB form.I also need to be able to create graphs using VB forms using the output file generated by the Fortran program.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved