Using DLL's in VB6 
Author Message
 Using DLL's in VB6

Hello,

I want to call a DLL function that will return me a device handle, but i'm
having problems with the argument type.

The C Header file has this declarations:

typedef void *FT_HANDLE;

int  M_createC(OUT FT_HANDLE *ftCont);

In Visual Basic I did this:

Public Declare Function M_createC Lib "myLib.dll" ( _
      ByRef ftContext As Any) As Long

sub temp()

   Dim rc As Long
   Dim g_Context As Long

   rc = M_createC(g_Context)  <-- The Error is: "Bad DLL calling convention"

End Sub

Can you help me with this ? How can I call this DLL function ?

Thanks in advance

Pedro Neves



Thu, 14 Feb 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Using DLL's in VB6

2. Using DLL's in VB6

3. Using class libraries (dll's) in Excel or VB6

4. Can't update VB6 DLL-file after it has been used by Visual Interdev

5. Can't update VB6 DLL-file after it has been used by Visual Interdev

6. Can't update VB6 DLL-file after it has been used by Visual Interdev

7. Can't update VB6 DLL-file after it has been used by Visual Interdev

8. Windows Service Calling VB6 dll doesn't work but works with VB6

9. VB6 IDE crashes when reference local DLL that uses a remote MTS DLL

10. About using 'DataGrid' in VB6

11. Help:Using VB Funtions In Access With DLL's, EXE's

12. Using 'C' DLL with VB5.0

 

 
Powered by phpBB® Forum Software