Problem with calling DLL

Problem with calling DLL

I'm calling DLL from Excel and everything works just fine. Today I tried to run that on another computer where visual fortran is not installed. So I installed the kit from the Compaq homepage. Then I placed the dll file with the excel workbook that calls the file on that machine (to the same folder).
Problem no. 1: simulations start with CPU usage ~98-100%, but the program is not responding and would not stop and would not return results to Excel. I'm using dll file made in release configuration (Win 32). Is it correct that the size of this file is less than one half of the debug dll version?
Problem no. 2: I need to specify the path to the dll file in my VBA code. If only filename is in parentheses, it would not run and produce output: can't find the file.
Could you, please, be so kind and let me know where might be the problem?

Thank you,
Milan

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

you need dforrt.dll and dformd.dll. put them in the winntsystem32 directory and you should be fine.

it is normal for the size of the release / debug mode to be very different. it depends on your detailed configuration. by default i think the release mode is smaller.

if you do not want to specify the exact path to your .dll in VB, you need to set up an environmental variable in the control panel->system->environment variables->path. add the path to your .dll in this parameter. depending on OS, the steps to get to this configuration can be different.

that should do it.

related to my last email, if you put your .dll in the system32 directory, you don't need to add the path.... actually if you put the .dll in any system path, you shouldn't have to specify the directory name. usually this isn't the case.

if you put the .dll in the same folder as the .xls file, this should also solve your problem.

As for problem (1), your dll probably got stuck in a DO WHILE loop. See this thread.

Message Edited by intel.software.network.support on 12-09-2005 09:58 AM

Jugoslav
www.xeffort.com

It looks like there is a problem with access violation (routine is trying to modify a constant argument), which causes problem under Windows NT/2000/XP, but works under Windows 9.
So I changed the code (output is not sent back in the same array that I used to send data in from visual basic) and it works.
The problem is that I don't know how to send the output back to visual basic. I declared new array in visual basic and I use this array just to send the output data from fortran to basic (Excel). But it doesn't work, it looks like there is no way I can modify an array declared in visual basic inside my fortran code.
Does anyone know how to pass output data back?
Thank you very much,
Milan

Leave a Comment

Please sign in to add a comment. Not a member? Join today