Click to See Complete Forum and Search --> : VB Problem finding DLL
Tom Verbruggen
June 28th, 2001, 05:11 AM
Hi,
I have the following problem...
I have written a VB program that uses a self written DLL.
When I launch the application from my own computer I have no problem.
But when I launch the same application from the same network drive but from a different computer
I get the error 'File not Found enmvbapi.dll'.
This is very strange because the only place the DLL is located is the directory from the EXE.
The DLL has not been registered on my system. I searched my registry for any reference regarding my DLL but I did not find it.
My VB declaration for my DLL is as follows :
Declare Function VBENMAttach Lib "enmvbapi.dll" (byval InUserId as string, byval InPassword as string, byval FuncId as string) as Integer
Am I missing somehting here... Should I doe additional things to make a DLL known to a computer.
Tom
Cakkie
June 28th, 2001, 06:05 AM
You can't call a VB dll like that. If it isn't a VB dll you're calling, you must register the dll. You can do this by using regsvr32.exe, which is located in the system directory.
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Clearcode
June 28th, 2001, 06:22 AM
The search pattern for DLLs goes:
$WINDIR, $WINDIR\System32, $Path, current directory.
So either add the dll to windows directory, system 32 directory or the path, or make sure that the "Start in" part of your application shortcut is the same directory as the DLL is in.
HTH,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Tom Verbruggen
June 28th, 2001, 06:28 AM
Duncan,
I already tried to put the DLL in the SYSTEM32 from my WINNT system. I took into account the search order of the DLL but it still does not work (event when I put it in the SYSTEM32 directory)...
Tom
cksiow
June 28th, 2001, 06:55 AM
like cakkie say, if your dll is ActiveX DLL, you need to register it. if it is only a normal win32 DLL, chances are the DLL that you are calling depends on other DLL which doesn't exist, in the case, the Depends.exe utility (come with visual studio 6) is a good utility which can show you if your DLL dependency is OK or not. just use depends on your self-written DLL.
HTH
cksiow
http://vblib.virtualave.net - share our codes
Tom Verbruggen
June 28th, 2001, 07:00 AM
Duncan,
problem solved....
I tried registering the DLL with REGSVR32.EXE and I got a errorcode from a subDLL delivered by the vendor.. Apparently the PC I tried running my program on was not at the right fix level and had differences in DLL's...
The LoadLibrary fails and VB acts by putting 'File not Found' as errorcode...
Tricky business....
Thx anyway !!!
Tom
Tom Verbruggen
June 28th, 2001, 07:01 AM
Tom,
problem solved....
I tried registering the DLL with REGSVR32.EXE and I got a errorcode from a subDLL delivered by the vendor.. Apparently the PC I tried running my program on was not at the right fix level and had differences in DLL's...
The LoadLibrary fails and VB acts by putting 'File not Found' as errorcode...
Tricky business....
Thx anyway !!!
Tom
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.