IMSAdminBase::GetHandleInfo

The IMSAdminBase::GetHandleInfo method retrieves information associated with the specified metabase handle.

HRESULT GetHandleInfo(
  METADATA_HANDLE hMDHandle,       //metabase handle
  PMETADATA_HANDLE_INFO pmdhiInfo  //receives the information 
                                   // associated with hMDHandle
);
 

Parameters

hMDHandle
Specifies a handle to the metabase, either METADATA_MASTER_ROOT_HANDLE or a handle returned by a previous call to the IMSAdminBase::OpenKey method.
pmdhiInfo
Points to a METADATA_HANDLE_INFO structure that receives the information about the handle.

Return Values

Returns an HRESULT that contains one of the following values:

ERROR_INVALID_HANDLE The handle is invalid.
ERROR_SUCCESS The method succeeded.

Remarks

The dwMDSystemChangeNumber member of the METADATA_HANDLE_INFO structure pointed to by pmdhiInfo will correspond to the system change number generated at the time the handle was created. It will not change if write operations are done using this handle, or any other handle. You can compare this number with the value returned by the IMSAdminBase::GetSystemChangeNumber method to see if any write operations have been done since the handle was opened.