ole32: Rename property variables in internal StorageImpl methods.
This commit is contained in:
parent
26acdb3efd
commit
d21d690ac5
|
@ -2988,7 +2988,7 @@ static void StorageImpl_SaveFileHeader(
|
||||||
*
|
*
|
||||||
* This method will read the raw data from a directory entry in the file.
|
* This method will read the raw data from a directory entry in the file.
|
||||||
*
|
*
|
||||||
* buffer must be PROPSET_BLOCK_SIZE bytes long.
|
* buffer must be RAW_DIRENTRY_SIZE bytes long.
|
||||||
*/
|
*/
|
||||||
HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer)
|
HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer)
|
||||||
{
|
{
|
||||||
|
@ -3014,7 +3014,7 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer
|
||||||
*
|
*
|
||||||
* This method will write the raw data from a directory entry in the file.
|
* This method will write the raw data from a directory entry in the file.
|
||||||
*
|
*
|
||||||
* buffer must be PROPSET_BLOCK_SIZE bytes long.
|
* buffer must be RAW_DIRENTRY_SIZE bytes long.
|
||||||
*/
|
*/
|
||||||
HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE *buffer)
|
HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE *buffer)
|
||||||
{
|
{
|
||||||
|
@ -3040,7 +3040,7 @@ HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE
|
||||||
*
|
*
|
||||||
* Update raw directory entry data from the fields in newData.
|
* Update raw directory entry data from the fields in newData.
|
||||||
*
|
*
|
||||||
* buffer must be PROPSET_BLOCK_SIZE bytes long.
|
* buffer must be RAW_DIRENTRY_SIZE bytes long.
|
||||||
*/
|
*/
|
||||||
void UpdateRawDirEntry(BYTE *buffer, const DirEntry *newData)
|
void UpdateRawDirEntry(BYTE *buffer, const DirEntry *newData)
|
||||||
{
|
{
|
||||||
|
@ -3110,87 +3110,87 @@ void UpdateRawDirEntry(BYTE *buffer, const DirEntry *newData)
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Storage32Impl_ReadProperty
|
* Storage32Impl_ReadDirEntry
|
||||||
*
|
*
|
||||||
* This method will read the specified property from the property chain.
|
* This method will read the specified directory entry.
|
||||||
*/
|
*/
|
||||||
BOOL StorageImpl_ReadDirEntry(
|
BOOL StorageImpl_ReadDirEntry(
|
||||||
StorageImpl* This,
|
StorageImpl* This,
|
||||||
ULONG index,
|
ULONG index,
|
||||||
DirEntry* buffer)
|
DirEntry* buffer)
|
||||||
{
|
{
|
||||||
BYTE currentProperty[RAW_DIRENTRY_SIZE];
|
BYTE currentEntry[RAW_DIRENTRY_SIZE];
|
||||||
HRESULT readRes;
|
HRESULT readRes;
|
||||||
|
|
||||||
readRes = StorageImpl_ReadRawDirEntry(This, index, currentProperty);
|
readRes = StorageImpl_ReadRawDirEntry(This, index, currentEntry);
|
||||||
|
|
||||||
if (SUCCEEDED(readRes))
|
if (SUCCEEDED(readRes))
|
||||||
{
|
{
|
||||||
/* replace the name of root entry (often "Root Entry") by the file name */
|
/* replace the name of root entry (often "Root Entry") by the file name */
|
||||||
WCHAR *propName = (index == This->base.storageDirEntry) ?
|
WCHAR *entryName = (index == This->base.storageDirEntry) ?
|
||||||
This->filename : (WCHAR *)currentProperty+OFFSET_PS_NAME;
|
This->filename : (WCHAR *)currentEntry+OFFSET_PS_NAME;
|
||||||
|
|
||||||
memset(buffer->name, 0, sizeof(buffer->name));
|
memset(buffer->name, 0, sizeof(buffer->name));
|
||||||
memcpy(
|
memcpy(
|
||||||
buffer->name,
|
buffer->name,
|
||||||
propName,
|
entryName,
|
||||||
DIRENTRY_NAME_BUFFER_LEN );
|
DIRENTRY_NAME_BUFFER_LEN );
|
||||||
TRACE("storage name: %s\n", debugstr_w(buffer->name));
|
TRACE("storage name: %s\n", debugstr_w(buffer->name));
|
||||||
|
|
||||||
memcpy(&buffer->stgType, currentProperty + OFFSET_PS_STGTYPE, 1);
|
memcpy(&buffer->stgType, currentEntry + OFFSET_PS_STGTYPE, 1);
|
||||||
|
|
||||||
StorageUtl_ReadWord(
|
StorageUtl_ReadWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_NAMELENGTH,
|
OFFSET_PS_NAMELENGTH,
|
||||||
&buffer->sizeOfNameString);
|
&buffer->sizeOfNameString);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_LEFTCHILD,
|
OFFSET_PS_LEFTCHILD,
|
||||||
&buffer->leftChild);
|
&buffer->leftChild);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_RIGHTCHILD,
|
OFFSET_PS_RIGHTCHILD,
|
||||||
&buffer->rightChild);
|
&buffer->rightChild);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_DIRROOT,
|
OFFSET_PS_DIRROOT,
|
||||||
&buffer->dirRootEntry);
|
&buffer->dirRootEntry);
|
||||||
|
|
||||||
StorageUtl_ReadGUID(
|
StorageUtl_ReadGUID(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_GUID,
|
OFFSET_PS_GUID,
|
||||||
&buffer->clsid);
|
&buffer->clsid);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_CTIMELOW,
|
OFFSET_PS_CTIMELOW,
|
||||||
&buffer->ctime.dwLowDateTime);
|
&buffer->ctime.dwLowDateTime);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_CTIMEHIGH,
|
OFFSET_PS_CTIMEHIGH,
|
||||||
&buffer->ctime.dwHighDateTime);
|
&buffer->ctime.dwHighDateTime);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_MTIMELOW,
|
OFFSET_PS_MTIMELOW,
|
||||||
&buffer->mtime.dwLowDateTime);
|
&buffer->mtime.dwLowDateTime);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_MTIMEHIGH,
|
OFFSET_PS_MTIMEHIGH,
|
||||||
&buffer->mtime.dwHighDateTime);
|
&buffer->mtime.dwHighDateTime);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_STARTBLOCK,
|
OFFSET_PS_STARTBLOCK,
|
||||||
&buffer->startingBlock);
|
&buffer->startingBlock);
|
||||||
|
|
||||||
StorageUtl_ReadDWord(
|
StorageUtl_ReadDWord(
|
||||||
currentProperty,
|
currentEntry,
|
||||||
OFFSET_PS_SIZE,
|
OFFSET_PS_SIZE,
|
||||||
&buffer->size.u.LowPart);
|
&buffer->size.u.LowPart);
|
||||||
|
|
||||||
|
@ -3201,19 +3201,19 @@ BOOL StorageImpl_ReadDirEntry(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* Write the specified property into the property chain
|
* Write the specified directory entry to the file
|
||||||
*/
|
*/
|
||||||
BOOL StorageImpl_WriteDirEntry(
|
BOOL StorageImpl_WriteDirEntry(
|
||||||
StorageImpl* This,
|
StorageImpl* This,
|
||||||
ULONG index,
|
ULONG index,
|
||||||
const DirEntry* buffer)
|
const DirEntry* buffer)
|
||||||
{
|
{
|
||||||
BYTE currentProperty[RAW_DIRENTRY_SIZE];
|
BYTE currentEntry[RAW_DIRENTRY_SIZE];
|
||||||
HRESULT writeRes;
|
HRESULT writeRes;
|
||||||
|
|
||||||
UpdateRawDirEntry(currentProperty, buffer);
|
UpdateRawDirEntry(currentEntry, buffer);
|
||||||
|
|
||||||
writeRes = StorageImpl_WriteRawDirEntry(This, index, currentProperty);
|
writeRes = StorageImpl_WriteRawDirEntry(This, index, currentEntry);
|
||||||
return SUCCEEDED(writeRes) ? TRUE : FALSE;
|
return SUCCEEDED(writeRes) ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue