My friend had written a DLL with C from which we are calling some functions in VB. The following is the code we're using but every time it gives us runtime errors - 'DLL Calling Convention Error'..

Can anyone enlighten us?

Code:
Global flagName As String

Public Declare Function getFlagState Lib "edrlib" (ByVal flagName As String) As Long


Private Sub Form_Load()
    e = getFlagState(flagName) 'error here
End Sub

Even any little pointers?? Is the problem in our DLL - it may be to do with the string data type...

Cheers!
Mafro

[Edited by Mafro on 05-26-2000 at 10:27 AM]