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, //Address of output variable that
// receives a pointer to the object's
// label string
LPTSTR FAR * lplpszType, //Address of output variable that
// receives a pointer to the object's
// long type string
LPTSTR FAR * lplpszShortType, //Address of output variable that
// receives a pointer to the object's
// short type string
LPTSTR FAR * lplpszLocation //Address of output variable that
// receives a pointer to the object's
// location string
);
This method supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as well as the following:
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.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oledlg.h.