Gets size, type, name and location information about an object.
HRESULT GetObjectInfo(
DWORD dwObject, |
//Unique 32-bit object identifier |
DWORD FAR *lpdwObjSize, |
//Pointer to object’s size |
LPTSTR FAR *lplpszLabel, |
//Indirect pointer to object’s label. |
LPTSTR FAR * lplpszType, |
//Indirect pointer to object’s “long” type |
LPTSTR FAR * lplpszShortType, |
//Indirect pointer to object’s “short” type |
LPTSTR FAR * lplpszLocation |
//Indirect pointer to the object’s source |
); |
Parameters
Return Values
This method supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as well as the following:
Remarks
The strings and the object’s size are displayed in the object properties “General” page.
Your implementation of GetObjectInfo should place each of the object’s attributes in the out parameters provided. Set lpdwObjSize to (DWORD)-1 when the size of the object is unknown. Allocate all strings (the rest of the params) with the OLE task allocator obtained via CoGetMalloc, as is standard for all OLE interfaces with [out] string parameters, or you can simply use CoTaskMemAlloc.
See Also