Home > Net >  VB.net API function call system in question
VB.net API function call system in question

Time:03-20

I need to use in the project system apis WindowFromPointXY
Public Shared Function WindowFromPointXY (ByVal xPoint As an Integer, ByVal yPoint As Integer) As Long

End the Function

Call is as follows:
Window handle=WindowFromPointXY (Cursor. Position. X, Cursor. The Position. The Y)

Runtime errors are as follows:
Other information: the PInvoke function "my spy! My_spy. Form1: : WindowFromPointXY "call stack asymmetry, the reason may be managed PInvoke signature and unmanaged target signature does not match, please check the PInvoke signature and unmanaged calling convention and parameters of target signature match,

Please show what was wrong with thanks
  • Related