LPCGUID and System.Guid

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

"CreateFile" APIl 2
Windos XP/2000 reboot 1
Error Message 1
GetKeyState 5
printing with rawprinter helper 1
CreateToolhelp32Snapshot 2
Send raw data to the printer 4
reboot windows 18

Top