Active Accessibility sends the WM_GETOBJECT message to obtain information about an accessible object contained in a server application.

Applications never send this message directly. It is sent only by Active Accessibility in response to calls to AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server applications handle this message.

dwFlags = (WPARAM)(DWORD) wParam;
dwObjId = (LPARAM)(DWORD) lParam;


  • dwFlags
    Provides additional information about the message and is used only by the system. Servers pass dwFlags as the wParam parameter in the call to LresultFromObject when handling the message.
  • dwObjId
    Object identifier. This value is one of the object identifier constants or a custom object identifier. Servers usually process WM_GETOBJECT only if the dwObjId is OBJID_CLIENT.

Return Values

The return value depends on whether the window or control that receives the message implements IAccessible:

  • If implementing IAccessible for the object, the application returns the result obtained from LresultFromObject.
  • If not implementing IAccessible, or if dwObjID is not OBJID_CLIENT, server applications should allow the message to pass to DefWindowProc.


When a client calls AccessibleObjectFromWindow or any of the other AccessibleObjectFromX APIs that retrieve an interface to an object, Active Accessibility sends the WM_GETOBJECT message to the appropriate window procedure within the appropriate server application. While processing WM_GETOBJECT, server applications call LresultFromObject and use the return value of this function as the return value for the message. Active Accessibility, in conjunction with the COM library, performs the appropriate marshaling and passes the interface pointer from the server back to the client.

Servers do not respond to WM_GETOBJECT before the object is fully initialized or after it begins to close down. When an application creates a new window, the system sends EVENT_OBJECT_CREATE to notify clients before it sends the WM_CREATE message to the application's window procedure. Because many applications use WM_CREATE to start their initialization process, servers do not respond to the WM_GETOBJECT message until finished processing the WM_CREATE message.

A server uses WM_GETOBJECT to perform the following tasks:

For clients, this means that they might receive distinct interface pointers for the same user interface element, depending on the server's action. To determine if two interface pointers point to the same user interface element, clients compare IAccessible properties of the object. Comparing pointers does not work.


**  Windows NT/2000/XP/Server 2003:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Redistributable:** Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
**  Header:** Declared in Winuser.h; include Windows.h.

See Also

How to Handle WM_GETOBJECT, How WM_GETOBJECT Works, LresultFromObject