Clients call IAccClientDocMgr::LookupByHWND to get a document by providing the HWND for the document.
HRESULT LookupByHWND( HWND hWnd, REFIID riid, IUnknown* ppunk );
- [in] The HWND of the document to be returned.
- [in] IID of the document being requested. This is usually IID_ITextStoreAnchor.
- [out] Interface pointer to the document being requested.
If successful, returns S_OK.
If not successful, returns the following value or another standard COM error code.
|E_FAIL||If the HWND does not correspond to an active document, then ppunk will be NULL.|
Servers might need to poll this method more than once before they receive a document. There can be a limited time lapse (approximately second) between when a document appears in the system and when it is registered with document services.
Windows NT/2000/XP/Server 2003: Included in Windows XP and Windows Server 2003.
Windows 95/98/Me: Unsupported.
Redistributable: Requires Active Accessibility 2.0 RDK on Windows NT 4.0 SP6 and Windows 98.
Header: Declared in Msaatext.h.