IAccessibleWindowlessSite::AcquireObjectIdRange method (oleacc.h)
Acquires a range of object IDs from the control host and marks them as reserved by a specific windowless control.
HRESULT AcquireObjectIdRange( long rangeSize, IAccessibleHandler *pRangeOwner, long *pRangeBase );
The size of the object ID range that is being requested.
The windowless control that is requesting the range.
The first object ID in the acquired range.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
To avoid using an object ID that belongs to another windowless control, a control should acquire an object ID range before calling the NotifyWinEvent function. A control should acquire enough object IDs for all of its contained accessible objects. For example, a tree control with 100 children would reserve at least 101 object IDs, one for the root, and one for each child. A tree control that is expected to grow would reserve as many object IDs as expected. If the tree control is expected to grow by several hundred children, it would reserve a range of 1000 IDs just to be safe.
When the window that contains the Microsoft ActiveX control receives a WM_GETOBJECT message with an LPARAM value (object ID) that is in a reserved range, it should call the IAccessibleHandler::AccessibleObjectFromID method to get an IAccessible object for that object ID.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|