OleAccAccessibleObjectFromWindow Method

Retrieves the address of the specified interface for the object associated with the specified window.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("OleAcc.dll", SetLastError = true)]
public static HResult AccessibleObjectFromWindow(
	IntPtr hWnd,
	uint id,
	ref Guid refRiid,
	out Object refObject
)

Parameters

hWnd  IntPtr
Specifies the handle of a window for which an object is to be retrieved.

To retrieve an interface pointer to the cursor or caret object, specify Zero and use the appropriate object ID in id parameter.

id  UInt32
Specifies the object ID.

This value is one of the standard object identifier constants or a custom object ID such as OBJID_NATIVEOM, which is the object ID for the Office native object model.

refRiid  Guid
Specifies the reference identifier of the requested interface.

This value is either IID_IAccessible or IID_IDispatch, but it can also be IID_IUnknown, or the IID of any interface that the object is expected to support.

refObject  Object
Address of a pointer variable that receives the address of the specified interface.

Return Value

HResult
If the function succeeds, the return value is S_OK.

If the function fails, the return value is a different HResult value.

Remarks

See Also