The error message returned when the MDA (managed debug failed ent) error occurs.
Pinvokestackimbalance Detected
Message: For the pinvoke function "skylinedemos! The call to skylinedemos. nativemethods: setwindowlong results in stack asymmetry. The reason may be that the hosted pinvoke signature does not match the non-hosted target signature. Check whether the call conventions and parameters of the pinvoke signature match the non-hosted target signature.
Error
Private const mouseeventf_leftdown = & H2
Private const mouseeventf_leftup = & h4
Private const mouseeventf_middledown = & H20
Private const mouseeventf_middleup = & h40
Private const mouseeventf_rightdown = & H8
Private const mouseeventf_rightup = & H10
As follows:
Private declare function setcursorpos lib "USER32" (byval X as long, byval y as long) as long
Private declare sub mouse_event lib "USER32" (byval dwflags as long, byval DX as long, byval dy as long, byval cbuttons as long, byval dwextrainfo as long)
Change the long type to int32. The Code is as follows:
Private declare function setcursorpos lib "USER32" (byval X as int32, byval y as int32) as int32
Private declare sub mouse_event lib "USER32" (byval dwflags as int32, byval DX as int32, byval dy as int32, byval cbuttons as int32, byval dwextrainfo as int32)