A
ats@jbex
Hi there,
I have the following Function and Const declarations in my project:
Public Declare Function GetKeyState Lib "USER32" Alias "GetKeyState" (ByVal
nVirtKey As Long) As Integer
Public Const VK_SHIFT As Integer = 16
I then have the following code:
Dim k as Integer
k = GetKeyState(VK_SHIFT)
As soon the code hits the last line above I get the following error:
"PInvokeStackImbalance was detected
Message: A call to PInvoke function
'LLWinDotNet!LLWinDotNet.mGlobals::GetKeyState' 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 anybody help me with this please.
TIA
--
ats@jbex
They say they've got control of you
But that's not true you know
They say they're a part of you
And that's a lie you know
They say you will never be
Free free free
SLF - Alternative Ulster
I have the following Function and Const declarations in my project:
Public Declare Function GetKeyState Lib "USER32" Alias "GetKeyState" (ByVal
nVirtKey As Long) As Integer
Public Const VK_SHIFT As Integer = 16
I then have the following code:
Dim k as Integer
k = GetKeyState(VK_SHIFT)
As soon the code hits the last line above I get the following error:
"PInvokeStackImbalance was detected
Message: A call to PInvoke function
'LLWinDotNet!LLWinDotNet.mGlobals::GetKeyState' 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 anybody help me with this please.
TIA
--
ats@jbex
They say they've got control of you
But that's not true you know
They say they're a part of you
And that's a lie you know
They say you will never be
Free free free
SLF - Alternative Ulster