ole32: Get rid of casts in GUID serialization helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4d605e8683
commit
31c41d9855
|
@ -1711,7 +1711,7 @@ static void PropertyStorage_MakeHeader(PropertyStorage_impl *This,
|
|||
StorageUtl_WriteWord(&hdr->wByteOrder, 0, PROPSETHDR_BYTEORDER_MAGIC);
|
||||
StorageUtl_WriteWord(&hdr->wFormat, 0, This->format);
|
||||
StorageUtl_WriteDWord(&hdr->dwOSVer, 0, This->originatorOS);
|
||||
StorageUtl_WriteGUID((BYTE *)&hdr->clsid, 0, &This->clsid);
|
||||
StorageUtl_WriteGUID(&hdr->clsid, 0, &This->clsid);
|
||||
StorageUtl_WriteDWord(&hdr->reserved, 0, 1);
|
||||
}
|
||||
|
||||
|
@ -1719,7 +1719,7 @@ static void PropertyStorage_MakeFmtIdOffset(PropertyStorage_impl *This,
|
|||
FORMATIDOFFSET *fmtOffset)
|
||||
{
|
||||
assert(fmtOffset);
|
||||
StorageUtl_WriteGUID((BYTE *)fmtOffset, 0, &This->fmtid);
|
||||
StorageUtl_WriteGUID(fmtOffset, 0, &This->fmtid);
|
||||
StorageUtl_WriteDWord(fmtOffset, offsetof(FORMATIDOFFSET, dwOffset),
|
||||
sizeof(PROPERTYSETHEADER) + sizeof(FORMATIDOFFSET));
|
||||
}
|
||||
|
@ -2008,7 +2008,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
|
|||
{
|
||||
CLSID temp;
|
||||
|
||||
StorageUtl_WriteGUID((BYTE *)&temp, 0, var->u.puuid);
|
||||
StorageUtl_WriteGUID(&temp, 0, var->u.puuid);
|
||||
hr = IStream_Write(This->stm, &temp, sizeof(temp), &count);
|
||||
bytesWritten = count;
|
||||
break;
|
||||
|
|
|
@ -7005,13 +7005,13 @@ void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value)
|
|||
memcpy(value->Data4, buffer+offset+8, sizeof(value->Data4));
|
||||
}
|
||||
|
||||
void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value)
|
||||
void StorageUtl_WriteGUID(void *buffer, ULONG offset, const GUID* value)
|
||||
{
|
||||
StorageUtl_WriteDWord(buffer, offset, value->Data1);
|
||||
StorageUtl_WriteWord(buffer, offset+4, value->Data2);
|
||||
StorageUtl_WriteWord(buffer, offset+6, value->Data3);
|
||||
|
||||
memcpy(buffer+offset+8, value->Data4, sizeof(value->Data4));
|
||||
memcpy((BYTE *)buffer + offset + 8, value->Data4, sizeof(value->Data4));
|
||||
}
|
||||
|
||||
void StorageUtl_CopyDirEntryToSTATSTG(
|
||||
|
|
|
@ -564,7 +564,7 @@ void StorageUtl_ReadULargeInteger(const BYTE* buffer, ULONG offset,
|
|||
void StorageUtl_WriteULargeInteger(BYTE* buffer, ULONG offset,
|
||||
const ULARGE_INTEGER *value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_WriteGUID(void *buffer, ULONG offset, const GUID* value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_CopyDirEntryToSTATSTG(StorageBaseImpl *storage,STATSTG* destination,
|
||||
const DirEntry* source, int statFlags) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
Loading…
Reference in New Issue