Clients call IAccClientDocMgr::LookupByHWND to get a document by providing the HWND for the document.
HRESULT LookupByHWND( HWND hWnd, REFIID riid, IUnknown **ppunk );
The HWND of the document to be returned.
IID of the document being requested. This is usually IID_ITextStoreAnchor.
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.
||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.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Redistributable||Active Accessibility 2.0 RDK on Windows NT 4.0 with SP6 and later and Windows 98|