IMSAdminBase::SetLastChangeTime

The IMSAdminBase::SetLastChangeTime method sets the last change time associated with a key in the metabase.

HRESULT SetLastChangeTime(

  METADATA_HANDLE hMDHandle,   //handle to the metabase.

  LPCWSTR pszMDPath,     //path to the key, relative to hMDHandle.

  PFILETIME pftMDLastChangeTime  //pointer to the last change time.

  BOOL bLocalTime      //local or UTC time.

);

 

Parameters
hMDHandle
Specifies a handle to the metabase. This can either be METADATA_MASTER_ROOT_HANDLE or a handle with write permissions returned by the IMSAdminBase::OpenKey method.
pszMDPath
Specifies the path of the key to be set, relative to the path of hMDHandle. For example, if the handle references the /LM key, you could specify the Web services subkey by using the path /W3SVC.
pftMDLastChangeTime
Points to a FILETIME structure that contains the last change time to set for the key
bLocalTime
Specifies whether the value pointed at by pftMDLastChangeTime is local (TRUE), or UTC time (FALSE).
Return Values

Returns an HRESULT that contains one of the following values:

Value Description
ERROR_INVALID_PARAMETER The parameter is incorrect.
ERROR_PATH_NOT_FOUND The specified path is not found.
ERROR_SUCCESS The method succeeded.

Remarks

In addition to calls to this method, last change times are updated whenever data or subkeys are set, added, renamed, deleted, copied, or moved.