First of all I want to say that I read most of the other questions here with similar issues before posting this question. But my situation is slightly different.
I have an old VB6 application which uses a custom C/C++ dll to send/read data over TCP.
The app is on a shared network drive of a win2003 server which multiple users can access. The dll sits in the application path and I use declare to load it.
VB6:
Public Declare Function Interface_Open Lib "Interface.dll" Alias "Open" As Integer
C/C++ dll:
_declspec(dllexport) int _stdcall Open() { }
Now for the strange part: The application runs smoothly for 90% of the time. But some users experience random the runtime error 48 "dll not found" while others dont.
It seems to fail when I try to call the dll:
Interface_Open
Im not able to replicate the error on my win7 64bit machine thats what confuses me. I also checked the network permissions for the users on the share but they were fine.
I don't think the problem lies inside the C/C++ code because logs tell me it failes before entering the dll.
Should I return a long value instead of an integer? Could this be a reason why it fails to load the dll?
Integers are 16 bit in VB, for compatability with 16 bit VB. So an integer in any other language is called a long in VB.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.