-----------------------------------------------
                                POINT ARGUMENT
                                 January 2017
                 -----------------------------------------------
                                    CCB



1. THE POINT STRUCTURE:

     typedef struct tagPOINT {
       LONG x;
       LONG y;
     } POINT, *PPOINT;

     HWND WINAPI WindowFromPoint(
       _In_  POINT Point
     );


2. REFERENCE CODE:

     In x86, a point argument is 2 arguments: pt.x and pt.y.

     For example, we can write the following code to call WindowFromPoint:

     ; WindowFromPoint PROTO :DWORD,:DWORD (2 arguments)
     push dword ptr pt.y
     push dword ptr pt.x
     call WindowFromPoint

     In x64, a point argument is 1 argument: pt.

     For example, we can write the following code to call WindowFromPoint:

     ; PROTO64 external,WindowFromPoint, :QWORD (1 argument)
     mov rcx, qword ptr pt
     call WindowFromPoint

     The following code is incorrectly in x64:

     ; incorrectly code (2 arguments?)
     mov ecx, dword ptr pt.x
     mov edx, dword ptr pt.y
     call WindowFromPoint


3. REFERENCE WINDOWS APIS:

     AccNotifyTouchInteraction(_In_ HWND hwndApp, _In_ HWND hwndTarget, _In_ POINT ptTarget);
     AccessibleObjectFromPoint(_In_ POINT ptScreen, _Outptr_ IAccessible ** ppacc, _Out_ VARIANT* pvarChild);
     ChildWindowFromPoint(_In_ HWND hWndParent, _In_ POINT Point);
     ChildWindowFromPointEx(_In_ HWND hwnd, _In_ POINT pt, _In_ UINT flags);
     DAD_DragEnterEx(HWND hwndTarget, const POINT ptStart);
     DAD_DragEnterEx2(_In_ HWND hwndTarget, const POINT ptStart, _In_opt_ IDataObject *pdtObject);
     DAD_DragMove(POINT pt);
     DragDetect(_In_ HWND hwnd, _In_ POINT pt);
     DwmTetherContact(DWORD dwPointerID, BOOL fEnable, POINT ptTether );
     HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, DWORD dwOptions, LPCRECT pRect, HRGN hrgn,
     POINT ptTest, _Out_ WORD *pwHitTestCode );
     LBItemFromPt(HWND hLB, POINT pt, BOOL bAutoScroll);
     MenuItemFromPoint(_In_opt_ HWND hWnd, _In_ HMENU hMenu, _In_ POINT ptScreen);
     MonitorFromPoint(_In_ POINT pt, _In_ DWORD dwFlags);
     PtInRect(_In_ CONST RECT *lprc, _In_ POINT pt);
     RealChildWindowFromPoint(_In_ HWND hwndParent, _In_ POINT ptParentClientCoords);
     WindowFromPhysicalPoint(_In_ POINT Point);
     WindowFromPoint(_In_ POINT Point);
     MonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags);


4. REFERENCE COM INTERFACES:

     HRESULT IDropTarget::DragEnter([in] IDataObject *pDataObj, [in] DWORD grfKeyState, [in] POINTL pt, [in, out] DWORD *pdwEffect);
     HRESULT IDropTarget::DragOver([in] DWORD grfKeyState, [in] POINTL pt, [in, out] DWORD *pdwEffect);
     HRESULT IDropTarget::Drop([in] IDataObject *pDataObj, [in] DWORD grfKeyState, [in] POINTL pt, [in, out] DWORD *pdwEffect);

     HRESULT IOleInPlaceSite::Scroll([in] SIZE scrollExtant);


5. OTHER:

     For reference only, there is no guarantees.

     Any questions or suggestions, please e-mail to ccb2000@163.com.