Export (0) Print
Expand All

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.

Syntax


HRESULT SetElementTimes(
  [in]  const WCHAR *pwcsName,
  [in]  FILETIME const *pctime,
  [in]  FILETIME const *patime,
  [in]  FILETIME const *pmtime
);

Parameters

pwcsName [in]

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.

pctime [in]

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

patime [in]

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

pmtime [in]

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.

S_OK

The time values were successfully set.

E_PENDING

Asynchronous Storage only: Part or all of the element's data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage.

STG_E_ACCESSDENIED

The caller does not have enough permissions for changing the element.

STG_E_FILENOTFOUND

The element with the specified name does not exist.

STG_E_INSUFFICIENTMEMORY

The element was not changed due to a lack of memory.

STG_E_INVALIDNAME

Not a valid value for the element name.

STG_E_INVALIDPOINTER

The pointer specified for the element was not valid.

STG_E_INVALIDPARAMETER

One of the parameters was not valid.

STG_E_TOOMANYOPENFILES

The element was not changed because there are too many open files.

STG_E_REVERTED

The storage object has been invalidated by a revert operation above it in the transaction tree.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Objidl.h

IDL

Objidl.idl

Library

Uuid.lib

DLL

Ole32.dll

IID

IID_IStorage is defined as 0000000B-0000-0000-C000-000000000046

See also

IStorage - Compound File Implementation
IStorage::Stat

 

 

Community Additions

ADD
Show:
© 2014 Microsoft