IOleUIObjInfo::GetObjectInfo

Gets size, type, name and location information about an object.

HRESULT GetObjectInfo(

DWORD dwObject,
//32-bit object identifier
DWORD FAR *lpdwObjSize,
//Points to object's size
LPTSTR FAR *lplpszLabel,
//Points to object's label.
LPTSTR FAR * lplpszType,
//Points to object's "long" type
LPTSTR FAR * lplpszShortType,
//Points to object's "short" type
LPTSTR FAR * lplpszLocation
//Points to the objects source
);

Parameters

dwObject

A unique 32-bit identifier for the object.

lpdwObjSize

[out] The object's size, in bytes, on disk. This may be an approximate value.

lplpszLabel

[out] Points to the object's label. May be NULL, which indicates that the implementation should not fill this in.

lplpszType

[out] Points to the object's "long" type. May be NULL, which indicates that the implementation should not fill this in.

lplpszShortType

[out] Points to the object's "short" type. May be NULL, which indicates that the implementation should not fill this in.

lplpszLocation

[out] Points to the object's source. May be NULL, which indicates that the implementation should not fill this in.

Return Values

S_OK

Successfully returned object information.

E_FAIL

Unable to get object information.

E_INVALIDARG

One or more invalid arguments.

E_OUTOFMEMORY

Insufficient memory.

Comment

The strings and the object's size are displayed in the object properties "General" page.

Notes To Implementors

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

CoGetMalloc, CoTaskMemAlloc

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database