I am trying to call LoadLibrary and load Delphi dll in ASP.NET application. On my production machine everything works fine (using VS integrated server), but when I place it on destination server, LoadLibrary returns IntPtr.Zero. File.Exists(libraryName)
returns true. What can be the problem?
views:
211answers:
2
+1
A:
most likely that delphi dll has an external dependency. if it were me, i'd write a small delphi app to load the library implicitly. when you run that helper app on the destination machine, you should get an error message on the screen that gives you the name of the missing external library.
Don Dickinson
2010-01-25 15:08:49
You are right. I had all necessary dependencies in the same directory, but it still didn't find it there. Extending %PATH% variable solved the problem. Thanks!
LukLed
2010-01-25 16:05:53
A:
Did you copy the delphi dll and its supporting DLL's onto the target machine, somewhere in the directory where the ASP.NET application is running off against?
Hope this helps, Best regards, Tom.
tommieb75
2010-01-25 15:43:46
No. I didn't have it in the same directory, but there was no problem with accessibility.
LukLed
2010-01-25 16:06:46