IPropertyStorage::SetTimes

Sets the modification, access, and creation times of this property set, if supported by the implementation. Not all implementations support all these time values.

HRESULT SetTimes(
  FILETIME const * pctime,  //New creation time for the property set
  FILETIME const * patime,  //New access time for the property set
  FILETIME const * pmtime  //New modification time for the property 
                           //set
);
 

Parameters

pctime
[in] Pointer to the new creation time for the property set. May be NULL, indicating that this time is not to be modified by this call.
patime
[in] Pointer to the new access time for the property set. May be NULL, indicating that this time is not to be modified by this call.
pmtime
[in] Pointer to the new modification time for the property set. May be NULL, indicating that this time is not to be modified by this call.

Return Values

This method supports the standard return value E_UNEXPECTED, as well as the following:

S_OK
All the requested times have been successfully updated.
STG_E_ACCESSDENIED
The requested access to the property storage object has been denied; no times have been updated.
STG_E_INSUFFICIENTMEMORY
There is not sufficient memory to perform this operation.
STG_E_INVALIDPARAMETER
The parameter is invalid. This error is returned if an attempt is made to set a time value which is not supported by this implementation.

Remarks

Sets the modification, access, and creation times of the current open property set, if supported by the implementation (not all implementations support all these time values). Unsupported timestamps are always reported as zero, enabling the caller to test for support. A call to IPropertyStorage::Stat supplies (among other information) timestamp information.

Notice that this functionality is provided as an IPropertyStorage method on a property storage object that is already open, in contrast to being provided as a method in IPropertySetStorage. Normally, when the SetTimes method is not explicitly called, the access and modification times are updated as a side effect of reading and writing the property set. When SetTimes is used, the latest specified times supersede either default times or time values specified in previous calls to SetTimes.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.

See Also

IPropertyStorage::Stat, FILETIME structure