Vincent Povirk : ole32: Clarify the timestamp fields in StgProperty.
Alexandre Julliard
julliard at winehq.org
Mon Oct 26 10:08:32 CDT 2009
Module: wine
Branch: master
Commit: 224ddb50f325d558d3e4a2f419484f1f30ba1b5d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=224ddb50f325d558d3e4a2f419484f1f30ba1b5d
Author: Vincent Povirk <madewokherd at gmail.com>
Date: Fri Oct 23 13:29:56 2009 -0500
ole32: Clarify the timestamp fields in StgProperty.
According to the MS spec, these are FILETIME structures containing creation
and modification times.
---
dlls/ole32/storage32.c | 50 +++++++++++++++++++++--------------------------
dlls/ole32/storage32.h | 14 +++++-------
2 files changed, 28 insertions(+), 36 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index b9c2f29..32ff8b6 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -773,10 +773,8 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
renamedProperty.dirProperty = currentProperty.dirProperty;
/* call CoFileTime to get the current time
- renamedProperty.timeStampS1
- renamedProperty.timeStampD1
- renamedProperty.timeStampS2
- renamedProperty.timeStampD2
+ renamedProperty.ctime
+ renamedProperty.mtime
renamedProperty.propertyUniqueID
*/
@@ -967,10 +965,8 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
newStreamProperty.dirProperty = PROPERTY_NULL;
/* call CoFileTime to get the current time
- newStreamProperty.timeStampS1
- newStreamProperty.timeStampD1
- newStreamProperty.timeStampS2
- newStreamProperty.timeStampD2
+ newStreamProperty.ctime
+ newStreamProperty.mtime
*/
/* newStreamProperty.propertyUniqueID */
@@ -1167,10 +1163,8 @@ static HRESULT WINAPI StorageImpl_CreateStorage(
newProperty.dirProperty = PROPERTY_NULL;
/* call CoFileTime to get the current time
- newProperty.timeStampS1
- newProperty.timeStampD1
- newProperty.timeStampS2
- newProperty.timeStampD2
+ newProperty.ctime
+ newProperty.mtime
*/
/* newStorageProperty.propertyUniqueID */
@@ -3234,23 +3228,23 @@ BOOL StorageImpl_ReadProperty(
StorageUtl_ReadDWord(
currentProperty,
- OFFSET_PS_TSS1,
- &buffer->timeStampS1);
+ OFFSET_PS_CTIMELOW,
+ &buffer->ctime.dwLowDateTime);
StorageUtl_ReadDWord(
currentProperty,
- OFFSET_PS_TSD1,
- &buffer->timeStampD1);
+ OFFSET_PS_CTIMEHIGH,
+ &buffer->ctime.dwHighDateTime);
StorageUtl_ReadDWord(
currentProperty,
- OFFSET_PS_TSS2,
- &buffer->timeStampS2);
+ OFFSET_PS_MTIMELOW,
+ &buffer->mtime.dwLowDateTime);
StorageUtl_ReadDWord(
currentProperty,
- OFFSET_PS_TSD2,
- &buffer->timeStampD2);
+ OFFSET_PS_MTIMEHIGH,
+ &buffer->mtime.dwHighDateTime);
StorageUtl_ReadDWord(
currentProperty,
@@ -3320,23 +3314,23 @@ BOOL StorageImpl_WriteProperty(
StorageUtl_WriteDWord(
currentProperty,
- OFFSET_PS_TSS1,
- buffer->timeStampS1);
+ OFFSET_PS_CTIMELOW,
+ buffer->ctime.dwLowDateTime);
StorageUtl_WriteDWord(
currentProperty,
- OFFSET_PS_TSD1,
- buffer->timeStampD1);
+ OFFSET_PS_CTIMEHIGH,
+ buffer->ctime.dwHighDateTime);
StorageUtl_WriteDWord(
currentProperty,
- OFFSET_PS_TSS2,
- buffer->timeStampS2);
+ OFFSET_PS_MTIMELOW,
+ buffer->mtime.dwLowDateTime);
StorageUtl_WriteDWord(
currentProperty,
- OFFSET_PS_TSD2,
- buffer->timeStampD2);
+ OFFSET_PS_MTIMEHIGH,
+ buffer->ctime.dwHighDateTime);
StorageUtl_WriteDWord(
currentProperty,
diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h
index fc4af32..a1b7ac5 100644
--- a/dlls/ole32/storage32.h
+++ b/dlls/ole32/storage32.h
@@ -58,10 +58,10 @@ static const ULONG OFFSET_PS_PREVIOUSPROP = 0x00000044;
static const ULONG OFFSET_PS_NEXTPROP = 0x00000048;
static const ULONG OFFSET_PS_DIRPROP = 0x0000004C;
static const ULONG OFFSET_PS_GUID = 0x00000050;
-static const ULONG OFFSET_PS_TSS1 = 0x00000064;
-static const ULONG OFFSET_PS_TSD1 = 0x00000068;
-static const ULONG OFFSET_PS_TSS2 = 0x0000006C;
-static const ULONG OFFSET_PS_TSD2 = 0x00000070;
+static const ULONG OFFSET_PS_CTIMELOW = 0x00000064;
+static const ULONG OFFSET_PS_CTIMEHIGH = 0x00000068;
+static const ULONG OFFSET_PS_MTIMELOW = 0x0000006C;
+static const ULONG OFFSET_PS_MTIMEHIGH = 0x00000070;
static const ULONG OFFSET_PS_STARTBLOCK = 0x00000074;
static const ULONG OFFSET_PS_SIZE = 0x00000078;
static const WORD DEF_BIG_BLOCK_SIZE_BITS = 0x0009;
@@ -136,10 +136,8 @@ struct StgProperty
ULONG nextProperty;
ULONG dirProperty;
GUID propertyUniqueID;
- ULONG timeStampS1;
- ULONG timeStampD1;
- ULONG timeStampS2;
- ULONG timeStampD2;
+ FILETIME ctime;
+ FILETIME mtime;
ULONG startingBlock;
ULARGE_INTEGER size;
};
More information about the wine-cvs
mailing list