P
penguin
I have a DLL "myLib.dll" that has the following function. The DLL is compiled in VC++.
LPCGUID AAAPI aaApi_GetItemGuid
(
LONG lIndex /* i Index of selected item */
);
Note: The output type is LPCGUID, not LPGUID
I declare the function like this in myModule
Public Declare Unicode Function aaApi_GetItemGuid Lib "myLib.dll" (ByVal lIndex As Integer) As system.Guid
Somewhere in the code, I have
Dim myGuid As System.Guid
...
myGuid = System.Guid.Empty
myGuid = aaApi_GetItemGuid(0) '<== Error here
It always returns
A call to PInvoke function 'MySolution!MyProject.myModule::aaApi_GetItemGuid' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Can anyone give me some hints?
Thanks
alex
LPCGUID AAAPI aaApi_GetItemGuid
(
LONG lIndex /* i Index of selected item */
);
Note: The output type is LPCGUID, not LPGUID
I declare the function like this in myModule
Public Declare Unicode Function aaApi_GetItemGuid Lib "myLib.dll" (ByVal lIndex As Integer) As system.Guid
Somewhere in the code, I have
Dim myGuid As System.Guid
...
myGuid = System.Guid.Empty
myGuid = aaApi_GetItemGuid(0) '<== Error here
It always returns
A call to PInvoke function 'MySolution!MyProject.myModule::aaApi_GetItemGuid' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Can anyone give me some hints?
Thanks
alex