When I use an API, the following error occurs: "MDA (managed debug failed ent ..." Solution

Source: Internet
Author: User

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)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.