IOleUIObjInfo::GetObjectInfo
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
dwObject
[in] Unique
32-bit identifier for the object.
lpdwObjSize
[out] Pointer
to the object s size, in bytes, on disk. This may be an approximate value.
lplpszLabel
[out]
Indirect pointer to the object s label. May be NULL, which indicates that the
implementation should not fill this in.
lplpszType
[out]
Indirect pointer to the object s long type. May be NULL, which indicates that
the implementation should not fill this in.
lplpszShortType
[out]
Indirect pointer to the object s short type. May be NULL, which indicates
that the implementation should not fill this in.
lplpszLocation
[out]
Indirect pointer to the object s source. May be NULL, which indicates that the
implementation should not fill this in.
Return Values
This method
supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as
well as the following:
S_OK
Successfully
returned object information.
Remarks
The strings
and the object s size are displayed in the object properties General page.
Notes To Implementers
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