Export (0) Print
Expand All

IAccClientDocMgr::LookupByHWND

Clients call IAccClientDocMgr::LookupByHWND to get a document by providing the HWND for the document.

HRESULT LookupByHWND(
  HWND hWnd,
  REFIID riid,
  IUnknown* ppunk
);

Parameters

hWnd
[in] The HWND of the document to be returned.
riid
[in] IID of the document being requested. This is usually IID_ITextStoreAnchor.
ppunk
[out] Interface pointer to the document being requested.

Return Values

If successful, returns S_OK.

If not successful, returns the following value or another standard COM error code.

Error Description
E_FAIL If the HWND does not correspond to an active document, then ppunk will be NULL.

Remarks

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.

Requirements

  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.

Community Additions

Show:
© 2014 Microsoft