LresultFromObject function (oleacc.h)
Returns a reference, similar to a handle, to the specified object. Servers return this reference when handling WM_GETOBJECT.
LRESULT LresultFromObject( [in] REFIID riid, [in] WPARAM wParam, [in] LPUNKNOWN punk );
Reference identifier of the interface provided to the client. This parameter is IID_IAccessible.
Value sent by the associated WM_GETOBJECT message in its wParam parameter.
If successful, returns a positive value that is a reference to the object.
If not successful, returns one of the values in the table that follows, or another standard COM error code.
||One or more arguments are not valid.|
||The object specified in the pAcc parameter does not support the interface specified in the riid parameter.|
||Insufficient memory to store the object reference.|
||An unexpected error occurred.|
LresultFromObject increments the object's reference count. If you are not storing the interface pointer passed to the function (that is, you create a new interface pointer for the object each time WM_GETOBJECT is received), call the object's Release method to decrement the reference count back to one. Then the client calls Release and the object is destroyed. For more information, see How to Handle WM_GETOBJECT.
Each time a server processes WM_GETOBJECT for a specific object, it calls LresultFromObject to obtain a new reference to the object. Servers do not save the reference returned from LresultFromObject from one instance of processing WM_GETOBJECT to use as the message's return value when processing subsequent WM_GETOBJECT messages for the same object. This causes the client to receive an error.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Redistributable||Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95|