PInvokeStackImbalance (Net 2.0)
-
from MS: The PInvokeStackImbalance managed debugging assistant (MDA) is activated when the CLR detects that the stack depth after a platform invoke call does not match the expected stack depth given the calling convention specified in the DllImportAttribute attribute as well as the declaration of the parameters in the managed signature... ok, understood, by my code is: Friend NotInheritable Class NativeMethods Private Sub New() End Sub Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal _ nVirtKey As Long) As Integer End Class Now, how should I change the parameters to match those MDA is looking for?!? Already tried to disable MDA via registry, but I think a solution is not covering an error ... Thanks in advance /// Angel
-
from MS: The PInvokeStackImbalance managed debugging assistant (MDA) is activated when the CLR detects that the stack depth after a platform invoke call does not match the expected stack depth given the calling convention specified in the DllImportAttribute attribute as well as the declaration of the parameters in the managed signature... ok, understood, by my code is: Friend NotInheritable Class NativeMethods Private Sub New() End Sub Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal _ nVirtKey As Long) As Integer End Class Now, how should I change the parameters to match those MDA is looking for?!? Already tried to disable MDA via registry, but I think a solution is not covering an error ... Thanks in advance /// Angel