Using DLL's and Declare Function statements 
Author Message
 Using DLL's and Declare Function statements

Ok, it's just wierd.

It seems every time I try to reference the .dll via relative pathnames
(as in the below example), I get a "File Not Found", even though the dll
is in the same directory as the project.

Private Declare Function DoMyCommand Lib "MyExternal.dll" (ByVal
lpBuffer As String) As Integer

In order to get things to work, I must include the absolute pathname
("C:\...\MyExternal.dll"), which I clearly do not want to do.  The worst
part is, in example projects using dll's, they do not include the
absolute pathname - they just provide the name of the dll.

Any ideas?

--
Mark Young



Tue, 23 Apr 2002 03:00:00 GMT  
 Using DLL's and Declare Function statements
The default directory when in the IDE is different from the default
directory when running the EXE, unless the EXE is in the same directory as
the IDE. Could this be your problem?

Quote:
> Ok, it's just wierd.

> It seems every time I try to reference the .dll via relative pathnames
> (as in the below example), I get a "File Not Found", even though the dll
> is in the same directory as the project.

> Private Declare Function DoMyCommand Lib "MyExternal.dll" (ByVal
> lpBuffer As String) As Integer

> In order to get things to work, I must include the absolute pathname
> ("C:\...\MyExternal.dll"), which I clearly do not want to do.  The worst
> part is, in example projects using dll's, they do not include the
> absolute pathname - they just provide the name of the dll.

> Any ideas?

> --
> Mark Young



Tue, 23 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. dll functions without declare statement (XLL for Access)?

2. setting dll name in function declare statement

3. Declare Function Statement "Alias" question

4. get API function declare statement

5. How to change a DLL name within a declare statement of compiled control

6. Is it possible to change a DLL name within a DECLARE statement of a COMPILED control

7. How to Create a Dll which can be called by the Declare Statement

8. ActiveX dll and Declare Statements ??????

9. How can you change a DLL string name within a Declare statement of a compiled control

10. unable to get vb5.0 to accept the print engine declare statement for the .dll

11. How VB finds a C DLL in a Declare statement

12. Calling A C++ DLL from VB without having Declare Statements

 

 
Powered by phpBB® Forum Software