GetObjectID
Purpose
The CMetaRepository class GetObjectID function returns the internal object ID of the object specified by global object identifier or class ID and name.
Syntax
HRESULT GetObjectID (const GUID &guid,
LPOBJECTID objid);
HRESULT GetObjectID(const GUID &gClassID,
const LPCTSTR strObjName,
LPOBJECTID objid);
HRESULT GetObjectID(const OBJECTID_t lClassID,
const LPCTSTR strObjName,
LPOBJECTID objid);
HRESULT GetObjectID (const GUID &guid,
LPOBJECTID objid)
const bool ErrIfNotFound);
HRESULT GetObjectID(const GUID &gClassID,
const LPCTSTR strObjName,
LPOBJECTID objid)
const bool ErrIfNotFound);
HRESULT GetObjectID(const OBJECTID_t lClassID,
const LPCTSTR strObjName,
LPOBJECTID objid)
const bool ErrIfNotFound);
Argument |
In/Out |
Description |
guid |
In |
Global identifier of object. |
gClassID |
In |
Global identifier of the class. |
lClassID |
In |
Internal identifier of the class. |
strObjName |
In |
Name of the object. |
objid |
Out |
ObjectID of specified object. |
ErrIfNotFound |
In |
Boolean to indicate if the function should return an error if the specified object ID is not found. True equals return an error. False equals if the objectID is not found, objid will be set to 0 and HRESULT=S_OK. If the function returns an error, the current transaction will be aborted. |