error in VB, can not find dll... can any one help?

error in VB, can not find dll... can any one help?

fastian的头像

Hi,
I have a huge fortran project as a dll from which I have exported a single function. Now when I call the exported function from VB, it gives an error message, "error 53, dll not found" All the paths are correct BTW.
The exported function works fine if I call it from VC but vb gives this error. I made another VC DLL so that I can call this fortran dll from there and call VC dll from VB. It started off fine. I put a message box in the call and it popped. But when I dllimport the fortran function in the VC DLL, VB started giving the same error for my VC DLL i.e. dll not found.
Can any one help me with this. What seems to be the problem here.

Regards,

Mohsin

2 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
sabalan的头像

I suppose that you have a module in your VB-project where you declare your Fortran function, say something like this:

Declare Function MyForFunc Lib ?MyForDLL.dll? (Var1 As Double, ByVal String1 As String,?)

Now, you have to either have MyForDLL.dll in your path (run SET at command prompt to see your path) or write the whole path to MyForDLL.dll in the declaration, say:

Declare Function MyForFunc Lib ?C:MyProgramsNewProjMyForDLL.dll? (Var1 As Double, ByVal String1 As String,?)

Otherwise you are going to get error 53.

Hope this helps.

Regards,

Sabalan.

登陆并发表评论。