|
-
June 28th, 2001, 05:11 AM
#1
VB Problem finding DLL
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
-
June 28th, 2001, 06:05 AM
#2
Re: VB Problem finding DLL
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
[email protected]
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
-
June 28th, 2001, 06:22 AM
#3
Re: VB Problem finding DLL
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
-
June 28th, 2001, 06:28 AM
#4
Re: VB Problem finding DLL
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
-
June 28th, 2001, 06:55 AM
#5
Re: VB Problem finding DLL
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
-
June 28th, 2001, 07:00 AM
#6
Re: VB Problem finding DLL
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
-
June 28th, 2001, 07:01 AM
#7
Re: VB Problem finding DLL
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|