VBA interface to third party DLL 
Author Message
 VBA interface to third party DLL


I want to access functions from a third party DLL (aimapi.dll).  The library
documentation states the following:

int an_read_init(initfile)
char *initfile

Which I translated to the following VBA code:

Public Declare Function an_read_init _
               Lib "aimapi.dll" _
               (ByVal initfile As String) _
               As Integer

But every time I try to call this function from Access I get a run time
error 49 stating that my DLL calling convention is wrong.  So I guess it
must have something to do with my parameter declaration.  BUT WHAT?

Calling this function from a C program is no problem.  The header files

#define MSWIN
int MSWIN an_read_init(char *);

What could be the problem here?  How does Access find out that the calling
conventions are wrong?  Is there any way to see what the library actually
expects as a parameter?

Thanks for any help,

Sascha Wildner
erpicon Software Development GmbH

Fri, 26 Dec 2003 17:37:54 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Third-Party ocx for MSDN Help interface

2. access rights issue using a third party dll from my dll under iis

3. Making function calls to a third-party printer SDK from VBA

4. NT Service Process and Third Party DLL

5. VBScript calling third party dll

6. VB calling DLL using Third party .ocx

7. call a 16bit third party dll from VB5

8. Newbie ?, How to use third party DLL components in IIS 5.0

9. Third party 16 bit DLL's

10. Creating a DLL or COM object for third party developer

11. Are there third party Command Button

12. Third Party Download Managers


Powered by phpBB® Forum Software