ole32: Constify some variables.

This commit is contained in:
Andrew Talbot 2007-07-04 20:12:48 +01:00 committed by Alexandre Julliard
parent e4bf7ab578
commit 67d667b828
5 changed files with 27 additions and 28 deletions

View File

@ -920,7 +920,7 @@ HRESULT BIGBLOCKFILE_ReadAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset,
} }
HRESULT BIGBLOCKFILE_WriteAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset, HRESULT BIGBLOCKFILE_WriteAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset,
void* buffer, const ULONG size, ULONG* bytesRead) const void* buffer, ULONG size, ULONG* bytesRead)
{ {
if (This->fileBased) if (This->fileBased)
return ImplBIGBLOCKFILE_WriteAt(This,offset,buffer,size,bytesRead); return ImplBIGBLOCKFILE_WriteAt(This,offset,buffer,size,bytesRead);

View File

@ -1617,7 +1617,7 @@ end:
} }
static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This, static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
DWORD propNum, DWORD propid, PROPVARIANT *var, DWORD *sectionOffset) DWORD propNum, DWORD propid, const PROPVARIANT *var, DWORD *sectionOffset)
{ {
HRESULT hr; HRESULT hr;
LARGE_INTEGER seek; LARGE_INTEGER seek;
@ -1717,7 +1717,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
FILETIME temp; FILETIME temp;
StorageUtl_WriteULargeInteger((BYTE *)&temp, 0, StorageUtl_WriteULargeInteger((BYTE *)&temp, 0,
(ULARGE_INTEGER *)&var->u.filetime); (const ULARGE_INTEGER *)&var->u.filetime);
hr = IStream_Write(This->stm, &temp, sizeof(FILETIME), &count); hr = IStream_Write(This->stm, &temp, sizeof(FILETIME), &count);
bytesWritten = count; bytesWritten = count;
break; break;

View File

@ -552,7 +552,7 @@ STORAGE_get_small_block(stream_access16 *str,int blocknr,BYTE *sblock) {
* STORAGE_put_small_block [INTERNAL] * STORAGE_put_small_block [INTERNAL]
*/ */
static BOOL static BOOL
STORAGE_put_small_block(stream_access16 *str,int blocknr,BYTE *sblock) { STORAGE_put_small_block(stream_access16 *str,int blocknr,const BYTE *sblock) {
BYTE block[BIGSIZE]; BYTE block[BIGSIZE];
int bigblocknr; int bigblocknr;
struct storage_pps_entry root; struct storage_pps_entry root;
@ -654,7 +654,7 @@ STORAGE_get_pps_entry(stream_access16*str,int n,struct storage_pps_entry *pstde)
* STORAGE_put_pps_entry [Internal] * STORAGE_put_pps_entry [Internal]
*/ */
static int static int
STORAGE_put_pps_entry(stream_access16*str,int n,struct storage_pps_entry *pstde) { STORAGE_put_pps_entry(stream_access16*str,int n,const struct storage_pps_entry *pstde) {
int blocknr; int blocknr;
BYTE block[BIGSIZE]; BYTE block[BIGSIZE];
struct storage_pps_entry *stde = (struct storage_pps_entry*)(((LPBYTE)block)+128*(n&3)); struct storage_pps_entry *stde = (struct storage_pps_entry*)(((LPBYTE)block)+128*(n&3));

View File

@ -91,7 +91,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct(StorageImpl* ancestorS
DWORD openFlags, ULONG rootTropertyIndex); DWORD openFlags, ULONG rootTropertyIndex);
static void StorageImpl_Destroy(StorageBaseImpl* iface); static void StorageImpl_Destroy(StorageBaseImpl* iface);
static BOOL StorageImpl_ReadBigBlock(StorageImpl* This, ULONG blockIndex, void* buffer); static BOOL StorageImpl_ReadBigBlock(StorageImpl* This, ULONG blockIndex, void* buffer);
static BOOL StorageImpl_WriteBigBlock(StorageImpl* This, ULONG blockIndex, void* buffer); static BOOL StorageImpl_WriteBigBlock(StorageImpl* This, ULONG blockIndex, const void* buffer);
static void StorageImpl_SetNextBlockInChain(StorageImpl* This, ULONG blockIndex, ULONG nextBlock); static void StorageImpl_SetNextBlockInChain(StorageImpl* This, ULONG blockIndex, ULONG nextBlock);
static HRESULT StorageImpl_LoadFileHeader(StorageImpl* This); static HRESULT StorageImpl_LoadFileHeader(StorageImpl* This);
static void StorageImpl_SaveFileHeader(StorageImpl* This); static void StorageImpl_SaveFileHeader(StorageImpl* This);
@ -279,7 +279,7 @@ static HRESULT StorageImpl_ReadAt(StorageImpl* This,
static HRESULT StorageImpl_WriteAt(StorageImpl* This, static HRESULT StorageImpl_WriteAt(StorageImpl* This,
ULARGE_INTEGER offset, ULARGE_INTEGER offset,
void* buffer, const void* buffer,
const ULONG size, const ULONG size,
ULONG* bytesWritten) ULONG* bytesWritten)
{ {
@ -3375,7 +3375,7 @@ BOOL StorageImpl_ReadProperty(
BOOL StorageImpl_WriteProperty( BOOL StorageImpl_WriteProperty(
StorageImpl* This, StorageImpl* This,
ULONG index, ULONG index,
StgProperty* buffer) const StgProperty* buffer)
{ {
BYTE currentProperty[PROPSET_BLOCK_SIZE]; BYTE currentProperty[PROPSET_BLOCK_SIZE];
ULARGE_INTEGER offsetInPropSet; ULARGE_INTEGER offsetInPropSet;
@ -3494,7 +3494,7 @@ static BOOL StorageImpl_ReadDWordFromBigBlock(
static BOOL StorageImpl_WriteBigBlock( static BOOL StorageImpl_WriteBigBlock(
StorageImpl* This, StorageImpl* This,
ULONG blockIndex, ULONG blockIndex,
void* buffer) const void* buffer)
{ {
ULARGE_INTEGER ulOffset; ULARGE_INTEGER ulOffset;
DWORD wrote; DWORD wrote;
@ -4338,7 +4338,7 @@ void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value)
void StorageUtl_CopyPropertyToSTATSTG( void StorageUtl_CopyPropertyToSTATSTG(
STATSTG* destination, STATSTG* destination,
StgProperty* source, const StgProperty* source,
int statFlags) int statFlags)
{ {
/* /*
@ -6864,7 +6864,7 @@ static HRESULT OLECONVERT_SaveOLE10(OLECONVERT_OLESTREAM_DATA *pData, LPOLESTREA
* *
* *
*/ */
static void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD nBufferLength) static void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, const BYTE *pBuffer, DWORD nBufferLength)
{ {
HRESULT hRes; HRESULT hRes;
HANDLE hFile; HANDLE hFile;
@ -7414,7 +7414,7 @@ static void OLECONVERT_CreateOlePresStream(LPSTORAGE pStorage, DWORD dwExtentX,
* Might need to verify the data and return appropriate error message * Might need to verify the data and return appropriate error message
* *
*/ */
static void OLECONVERT_CreateOle10NativeStream(LPSTORAGE pStorage, BYTE *pData, DWORD dwDataLength) static void OLECONVERT_CreateOle10NativeStream(LPSTORAGE pStorage, const BYTE *pData, DWORD dwDataLength)
{ {
HRESULT hRes; HRESULT hRes;
IStream *pStream; IStream *pStream;

View File

@ -189,7 +189,7 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
HRESULT BIGBLOCKFILE_ReadAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset, HRESULT BIGBLOCKFILE_ReadAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset,
void* buffer, ULONG size, ULONG* bytesRead); void* buffer, ULONG size, ULONG* bytesRead);
HRESULT BIGBLOCKFILE_WriteAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset, HRESULT BIGBLOCKFILE_WriteAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset,
void* buffer, const ULONG size, ULONG* bytesRead); const void* buffer, ULONG size, ULONG* bytesRead);
/************************************************************************* /*************************************************************************
* Ole Convert support * Ole Convert support
@ -318,7 +318,7 @@ BOOL StorageImpl_ReadProperty(
BOOL StorageImpl_WriteProperty( BOOL StorageImpl_WriteProperty(
StorageImpl* This, StorageImpl* This,
ULONG index, ULONG index,
StgProperty* buffer); const StgProperty* buffer);
BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks( BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
StorageImpl* This, StorageImpl* This,
@ -423,8 +423,7 @@ void StorageUtl_WriteULargeInteger(BYTE* buffer, ULONG offset,
const ULARGE_INTEGER *value); const ULARGE_INTEGER *value);
void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value); void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value);
void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value); void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value);
void StorageUtl_CopyPropertyToSTATSTG(STATSTG* destination, void StorageUtl_CopyPropertyToSTATSTG(STATSTG* destination, const StgProperty* source,
StgProperty* source,
int statFlags); int statFlags);
/**************************************************************************** /****************************************************************************