3.1.4.20 GetLastChangeTime (Opnum 25)

The GetLastChangeTime method returns the last change time associated with a node in the metabase.

 HRESULT GetLastChangeTime(
   [in] METADATA_HANDLE hMDHandle,
   [unique, in, string] LPCWSTR pszMDPath,
   [out] PFILETIME pftMDLastChangeTime,
   [in] BOOL bLocalTime
 );

hMDHandle: An unsigned 32-bit integer value containing an open metabase handle specifying the key to be queried.

pszMDPath: A pointer to a Unicode string containing the path of the node to be queried, relative to the path of the hMDHandle parameter.

pftMDLastChangeTime: A pointer to a FILETIME structure that returns the last change time for the node.

bLocalTime: A Boolean value indicating whether the time value returned in the pftMDLastChangeTime parameter is specified as local time (TRUE) or UTC time (FALSE).

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF].

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070003

ERROR_PATH_NOT_FOUND

The system cannot find the path specified.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

The opnum field value for this method is 25.

When processing this call, the server MUST do the following:

  • Check the path of the node indicated by hMDHandle and pszMDPath. If the path does not exist, return ERROR_PATH_NOT_FOUND.

  • If the path exists and is valid, the server SHOULD return the time that the node was modified in the pftMDLastChangeTime structure. If bLocalTime is 0, the time is returned as UTC time. Otherwise the time is the local server time.<15>