IStorage::SetElementTimes method

The SetElementTimes method sets the modification, access, and creation times of the specified storage element, if the underlying file system supports this method.


HRESULT SetElementTimes(
  const OLECHAR  *pwcsName,
  const FILETIME *pctime,
  const FILETIME *patime,
  const FILETIME *pmtime



The name of the storage object element whose times are to be modified. If NULL, the time is set on the root storage rather than one of its elements.


Either the new creation time for the element or NULL if the creation time is not to be modified.


Either the new access time for the element or NULL if the access time is not to be modified.


Either the new modification time for the element or NULL if the modification time is not to be modified.

Return value

This method can return one of these values.


SetElementTimes sets time statistics for the specified storage element within this storage object.

Not all file systems support all the time values. This method sets those times that are supported and ignores the rest. Each time-value parameter can be NULL; indicating that no modification should occur.

Call the IStorage::Stat method to retrieve these time values.


Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objidl.h
Library Uuid.lib
DLL Ole32.dll

See also

IStorage - Compound File Implementation