Changeset 21916 for trunk/src/ole32/storage32.c
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/ole32/storage32.c
r21494 r21916 681 681 if (res == S_OK) 682 682 { 683 TRACE("<-- STATSTG: pwcsName: %s, type: %ld, cbSize.Low/High: %ld/%ld, grfMode: %08lx, grfLocksSupported: %ld, grfStateBits: %08lx\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize. s.LowPart, pstatstg->cbSize.s.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);683 TRACE("<-- STATSTG: pwcsName: %s, type: %ld, cbSize.Low/High: %ld/%ld, grfMode: %08lx, grfLocksSupported: %ld, grfStateBits: %08lx\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.DUMMYSTRUCTNAME_DOT LowPart, pstatstg->cbSize.DUMMYSTRUCTNAME_DOT HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits); 684 684 } 685 685 TRACE("<-- %08lx\n", res); … … 765 765 renamedProperty.propertyType = currentProperty.propertyType; 766 766 renamedProperty.startingBlock = currentProperty.startingBlock; 767 renamedProperty.size. s.LowPart = currentProperty.size.s.LowPart;768 renamedProperty.size. s.HighPart = currentProperty.size.s.HighPart;767 renamedProperty.size.DUMMYSTRUCTNAME_DOT LowPart = currentProperty.size.DUMMYSTRUCTNAME_DOT LowPart; 768 renamedProperty.size.DUMMYSTRUCTNAME_DOT HighPart = currentProperty.size.DUMMYSTRUCTNAME_DOT HighPart; 769 769 770 770 renamedProperty.previousProperty = PROPERTY_NULL; … … 939 939 newStreamProperty.propertyType = PROPTYPE_STREAM; 940 940 newStreamProperty.startingBlock = BLOCK_END_OF_CHAIN; 941 newStreamProperty.size. s.LowPart = 0;942 newStreamProperty.size. s.HighPart = 0;941 newStreamProperty.size.DUMMYSTRUCTNAME_DOT LowPart = 0; 942 newStreamProperty.size.DUMMYSTRUCTNAME_DOT HighPart = 0; 943 943 944 944 newStreamProperty.previousProperty = PROPERTY_NULL; … … 1124 1124 newProperty.propertyType = PROPTYPE_STORAGE; 1125 1125 newProperty.startingBlock = BLOCK_END_OF_CHAIN; 1126 newProperty.size. s.LowPart = 0;1127 newProperty.size. s.HighPart = 0;1126 newProperty.size.DUMMYSTRUCTNAME_DOT LowPart = 0; 1127 newProperty.size.DUMMYSTRUCTNAME_DOT HighPart = 0; 1128 1128 1129 1129 newProperty.previousProperty = PROPERTY_NULL; … … 1246 1246 * initialize the size used by the property stream 1247 1247 */ 1248 newSize. s.HighPart = 0;1249 newSize. s.LowPart = storage->bigBlockSize * blockCount;1248 newSize.DUMMYSTRUCTNAME_DOT HighPart = 0; 1249 newSize.DUMMYSTRUCTNAME_DOT LowPart = storage->bigBlockSize * blockCount; 1250 1250 1251 1251 /* … … 1875 1875 ULARGE_INTEGER size; 1876 1876 1877 size. s.HighPart = 0;1878 size. s.LowPart = 0;1877 size.DUMMYSTRUCTNAME_DOT HighPart = 0; 1878 size.DUMMYSTRUCTNAME_DOT LowPart = 0; 1879 1879 1880 1880 hr = StorageBaseImpl_OpenStream( … … 2283 2283 * Add one block for the big block depot and one block for the properties 2284 2284 */ 2285 size. s.HighPart = 0;2286 size. s.LowPart = This->bigBlockSize * 3;2285 size.DUMMYSTRUCTNAME_DOT HighPart = 0; 2286 size.DUMMYSTRUCTNAME_DOT LowPart = This->bigBlockSize * 3; 2287 2287 BIGBLOCKFILE_SetSize(This->bigBlockFile, size); 2288 2288 … … 2351 2351 rootProp.dirProperty = PROPERTY_NULL; 2352 2352 rootProp.startingBlock = BLOCK_END_OF_CHAIN; 2353 rootProp.size. s.HighPart = 0;2354 rootProp.size. s.LowPart = 0;2353 rootProp.size.DUMMYSTRUCTNAME_DOT HighPart = 0; 2354 rootProp.size.DUMMYSTRUCTNAME_DOT LowPart = 0; 2355 2355 2356 2356 StorageImpl_WriteProperty(This, 0, &rootProp); … … 3128 3128 ULONG bytesRead; 3129 3129 3130 offsetInPropSet. s.HighPart = 0;3131 offsetInPropSet. s.LowPart = index * PROPSET_BLOCK_SIZE;3130 offsetInPropSet.DUMMYSTRUCTNAME_DOT HighPart = 0; 3131 offsetInPropSet.DUMMYSTRUCTNAME_DOT LowPart = index * PROPSET_BLOCK_SIZE; 3132 3132 3133 3133 readSuccessful = BlockChainStream_ReadAt( … … 3206 3206 currentProperty, 3207 3207 OFFSET_PS_SIZE, 3208 &buffer->size. s.LowPart);3209 3210 buffer->size. s.HighPart = 0;3208 &buffer->size.DUMMYSTRUCTNAME_DOT LowPart); 3209 3210 buffer->size.DUMMYSTRUCTNAME_DOT HighPart = 0; 3211 3211 } 3212 3212 … … 3227 3227 ULONG bytesWritten; 3228 3228 3229 offsetInPropSet. s.HighPart = 0;3230 offsetInPropSet. s.LowPart = index * PROPSET_BLOCK_SIZE;3229 offsetInPropSet.DUMMYSTRUCTNAME_DOT HighPart = 0; 3230 offsetInPropSet.DUMMYSTRUCTNAME_DOT LowPart = index * PROPSET_BLOCK_SIZE; 3231 3231 3232 3232 memset(currentProperty, 0, PROPSET_BLOCK_SIZE); … … 3292 3292 currentProperty, 3293 3293 OFFSET_PS_SIZE, 3294 buffer->size. s.LowPart);3294 buffer->size.DUMMYSTRUCTNAME_DOT LowPart); 3295 3295 3296 3296 writeSuccessful = BlockChainStream_WriteAt(This->rootBlockChain, … … 3404 3404 * by small block size increments. 3405 3405 */ 3406 offset. s.LowPart = 0;3407 offset. s.HighPart = 0;3406 offset.DUMMYSTRUCTNAME_DOT LowPart = 0; 3407 offset.DUMMYSTRUCTNAME_DOT HighPart = 0; 3408 3408 cbTotalRead = 0; 3409 3409 cbTotalWritten = 0; … … 3426 3426 cbTotalWritten += cbWritten; 3427 3427 3428 offset. s.LowPart += This->smallBlockSize;3428 offset.DUMMYSTRUCTNAME_DOT LowPart += This->smallBlockSize; 3429 3429 3430 3430 } while (successRead && successWrite); … … 3437 3437 */ 3438 3438 propertyIndex = (*ppsbChain)->ownerPropertyIndex; 3439 size. s.HighPart = 0;3440 size. s.LowPart = 0;3439 size.DUMMYSTRUCTNAME_DOT HighPart = 0; 3440 size.DUMMYSTRUCTNAME_DOT LowPart = 0; 3441 3441 SmallBlockChainStream_SetSize(*ppsbChain, size); 3442 3442 SmallBlockChainStream_Destroy(*ppsbChain); … … 4265 4265 ULONG* bytesRead) 4266 4266 { 4267 ULONG blockNoInSequence = offset. s.LowPart / This->parentStorage->bigBlockSize;4268 ULONG offsetInBlock = offset. s.LowPart % This->parentStorage->bigBlockSize;4267 ULONG blockNoInSequence = offset.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->bigBlockSize; 4268 ULONG offsetInBlock = offset.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->bigBlockSize; 4269 4269 ULONG bytesToReadInBuffer; 4270 4270 ULONG blockIndex; … … 4353 4353 ULONG* bytesWritten) 4354 4354 { 4355 ULONG blockNoInSequence = offset. s.LowPart / This->parentStorage->bigBlockSize;4356 ULONG offsetInBlock = offset. s.LowPart % This->parentStorage->bigBlockSize;4355 ULONG blockNoInSequence = offset.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->bigBlockSize; 4356 ULONG offsetInBlock = offset.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->bigBlockSize; 4357 4357 ULONG bytesToWrite; 4358 4358 ULONG blockIndex; … … 4449 4449 * Figure out how many blocks are needed to contain the new size 4450 4450 */ 4451 numBlocks = newSize. s.LowPart / This->parentStorage->bigBlockSize;4452 4453 if ((newSize. s.LowPart % This->parentStorage->bigBlockSize) != 0)4451 numBlocks = newSize.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->bigBlockSize; 4452 4453 if ((newSize.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->bigBlockSize) != 0) 4454 4454 numBlocks++; 4455 4455 … … 4549 4549 * Figure out how many blocks are needed to contain this stream 4550 4550 */ 4551 newNumBlocks = newSize. s.LowPart / This->parentStorage->bigBlockSize;4552 4553 if ((newSize. s.LowPart % This->parentStorage->bigBlockSize) != 0)4551 newNumBlocks = newSize.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->bigBlockSize; 4552 4553 if ((newSize.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->bigBlockSize) != 0) 4554 4554 newNumBlocks++; 4555 4555 … … 4623 4623 ULARGE_INTEGER size = BlockChainStream_GetSize(This); 4624 4624 4625 if (newSize. s.LowPart == size.s.LowPart)4625 if (newSize.DUMMYSTRUCTNAME_DOT LowPart == size.DUMMYSTRUCTNAME_DOT LowPart) 4626 4626 return TRUE; 4627 4627 4628 if (newSize. s.LowPart < size.s.LowPart)4628 if (newSize.DUMMYSTRUCTNAME_DOT LowPart < size.DUMMYSTRUCTNAME_DOT LowPart) 4629 4629 { 4630 4630 BlockChainStream_Shrink(This, newSize); … … 4635 4635 BIGBLOCKFILE_GetSize(This->parentStorage->bigBlockFile); 4636 4636 4637 ULONG diff = newSize. s.LowPart - size.s.LowPart;4637 ULONG diff = newSize.DUMMYSTRUCTNAME_DOT LowPart - size.DUMMYSTRUCTNAME_DOT LowPart; 4638 4638 4639 4639 /* … … 4644 4644 (diff % This->parentStorage->bigBlockSize) ); 4645 4645 4646 fileSize. s.LowPart += diff;4646 fileSize.DUMMYSTRUCTNAME_DOT LowPart += diff; 4647 4647 BIGBLOCKFILE_SetSize(This->parentStorage->bigBlockFile, fileSize); 4648 4648 … … 4684 4684 */ 4685 4685 ULARGE_INTEGER result; 4686 result. s.HighPart = 0;4687 4688 result. s.LowPart =4686 result.DUMMYSTRUCTNAME_DOT HighPart = 0; 4687 4688 result.DUMMYSTRUCTNAME_DOT LowPart = 4689 4689 BlockChainStream_GetCount(This) * 4690 4690 This->parentStorage->bigBlockSize; … … 4767 4767 *nextBlockInChain = BLOCK_END_OF_CHAIN; 4768 4768 4769 offsetOfBlockInDepot. s.HighPart = 0;4770 offsetOfBlockInDepot. s.LowPart = blockIndex * sizeof(ULONG);4769 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT HighPart = 0; 4770 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT LowPart = blockIndex * sizeof(ULONG); 4771 4771 4772 4772 /* … … 4806 4806 ULONG bytesWritten; 4807 4807 4808 offsetOfBlockInDepot. s.HighPart = 0;4809 offsetOfBlockInDepot. s.LowPart = blockIndex * sizeof(ULONG);4808 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT HighPart = 0; 4809 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT LowPart = blockIndex * sizeof(ULONG); 4810 4810 4811 4811 StorageUtl_WriteDWord(&buffer, 0, nextBlock); … … 4852 4852 ULONG smallBlocksPerBigBlock; 4853 4853 4854 offsetOfBlockInDepot. s.HighPart = 0;4854 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT HighPart = 0; 4855 4855 4856 4856 /* … … 4859 4859 while (nextBlockIndex != BLOCK_UNUSED) 4860 4860 { 4861 offsetOfBlockInDepot. s.LowPart = blockIndex * sizeof(ULONG);4861 offsetOfBlockInDepot.DUMMYSTRUCTNAME_DOT LowPart = blockIndex * sizeof(ULONG); 4862 4862 4863 4863 success = BlockChainStream_ReadAt( … … 4946 4946 4947 4947 rootProp.startingBlock = sbStartIndex; 4948 rootProp.size. s.HighPart = 0;4949 rootProp.size. s.LowPart = This->parentStorage->bigBlockSize;4948 rootProp.size.DUMMYSTRUCTNAME_DOT HighPart = 0; 4949 rootProp.size.DUMMYSTRUCTNAME_DOT LowPart = This->parentStorage->bigBlockSize; 4950 4950 4951 4951 StorageImpl_WriteProperty( … … 4973 4973 &rootProp); 4974 4974 4975 if (rootProp.size. s.LowPart <4975 if (rootProp.size.DUMMYSTRUCTNAME_DOT LowPart < 4976 4976 (blocksRequired * This->parentStorage->bigBlockSize)) 4977 4977 { 4978 rootProp.size. s.LowPart += This->parentStorage->bigBlockSize;4978 rootProp.size.DUMMYSTRUCTNAME_DOT LowPart += This->parentStorage->bigBlockSize; 4979 4979 4980 4980 BlockChainStream_SetSize( … … 5008 5008 ULARGE_INTEGER offsetInBigBlockFile; 5009 5009 ULONG blockNoInSequence = 5010 offset. s.LowPart / This->parentStorage->smallBlockSize;5011 5012 ULONG offsetInBlock = offset. s.LowPart % This->parentStorage->smallBlockSize;5010 offset.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->smallBlockSize; 5011 5012 ULONG offsetInBlock = offset.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->smallBlockSize; 5013 5013 ULONG bytesToReadInBuffer; 5014 5014 ULONG blockIndex; … … 5019 5019 * This should never happen on a small block file. 5020 5020 */ 5021 assert(offset. s.HighPart==0);5021 assert(offset.DUMMYSTRUCTNAME_DOT HighPart==0); 5022 5022 5023 5023 /* … … 5051 5051 * Calculate the offset of the small block in the small block file. 5052 5052 */ 5053 offsetInBigBlockFile. s.HighPart = 0;5054 offsetInBigBlockFile. s.LowPart =5053 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT HighPart = 0; 5054 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT LowPart = 5055 5055 blockIndex * This->parentStorage->smallBlockSize; 5056 5056 5057 offsetInBigBlockFile. s.LowPart += offsetInBlock;5057 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT LowPart += offsetInBlock; 5058 5058 5059 5059 /* … … 5098 5098 ULARGE_INTEGER offsetInBigBlockFile; 5099 5099 ULONG blockNoInSequence = 5100 offset. s.LowPart / This->parentStorage->smallBlockSize;5101 5102 ULONG offsetInBlock = offset. s.LowPart % This->parentStorage->smallBlockSize;5100 offset.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->smallBlockSize; 5101 5102 ULONG offsetInBlock = offset.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->smallBlockSize; 5103 5103 ULONG bytesToWriteInBuffer; 5104 5104 ULONG blockIndex; … … 5109 5109 * This should never happen on a small block file. 5110 5110 */ 5111 assert(offset. s.HighPart==0);5111 assert(offset.DUMMYSTRUCTNAME_DOT HighPart==0); 5112 5112 5113 5113 /* … … 5142 5142 * Calculate the offset of the small block in the small block file. 5143 5143 */ 5144 offsetInBigBlockFile. s.HighPart = 0;5145 offsetInBigBlockFile. s.LowPart =5144 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT HighPart = 0; 5145 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT LowPart = 5146 5146 blockIndex * This->parentStorage->smallBlockSize; 5147 5147 5148 offsetInBigBlockFile. s.LowPart += offsetInBlock;5148 offsetInBigBlockFile.DUMMYSTRUCTNAME_DOT LowPart += offsetInBlock; 5149 5149 5150 5150 /* … … 5187 5187 ULONG count = 0; 5188 5188 5189 numBlocks = newSize. s.LowPart / This->parentStorage->smallBlockSize;5190 5191 if ((newSize. s.LowPart % This->parentStorage->smallBlockSize) != 0)5189 numBlocks = newSize.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->smallBlockSize; 5190 5191 if ((newSize.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->smallBlockSize) != 0) 5192 5192 numBlocks++; 5193 5193 … … 5300 5300 * Figure out how many blocks are needed to contain this stream 5301 5301 */ 5302 newNumBlocks = newSize. s.LowPart / This->parentStorage->smallBlockSize;5303 5304 if ((newSize. s.LowPart % This->parentStorage->smallBlockSize) != 0)5302 newNumBlocks = newSize.DUMMYSTRUCTNAME_DOT LowPart / This->parentStorage->smallBlockSize; 5303 5304 if ((newSize.DUMMYSTRUCTNAME_DOT LowPart % This->parentStorage->smallBlockSize) != 0) 5305 5305 newNumBlocks++; 5306 5306 … … 5376 5376 ULARGE_INTEGER size = SmallBlockChainStream_GetSize(This); 5377 5377 5378 if (newSize. s.LowPart == size.s.LowPart)5378 if (newSize.DUMMYSTRUCTNAME_DOT LowPart == size.DUMMYSTRUCTNAME_DOT LowPart) 5379 5379 return TRUE; 5380 5380 5381 if (newSize. s.LowPart < size.s.LowPart)5381 if (newSize.DUMMYSTRUCTNAME_DOT LowPart < size.DUMMYSTRUCTNAME_DOT LowPart) 5382 5382 { 5383 5383 SmallBlockChainStream_Shrink(This, newSize); … … 5822 5822 ULARGE_INTEGER offset; 5823 5823 5824 offset. s.HighPart = 0;5825 offset. s.LowPart = 0;5824 offset.DUMMYSTRUCTNAME_DOT HighPart = 0; 5825 offset.DUMMYSTRUCTNAME_DOT LowPart = 0; 5826 5826 5827 5827 ILockBytes_ReadAt(plkbyt, offset, sig, sizeof(sig), NULL); … … 6810 6810 6811 6811 /*Get the OleType from the CompObj Stream */ 6812 iSeekPos. s.LowPart = sizeof(CompObj.byUnknown1) + sizeof(CompObj.clsid);6813 iSeekPos. s.HighPart = 0;6812 iSeekPos.DUMMYSTRUCTNAME_DOT LowPart = sizeof(CompObj.byUnknown1) + sizeof(CompObj.clsid); 6813 iSeekPos.DUMMYSTRUCTNAME_DOT HighPart = 0; 6814 6814 6815 6815 IStream_Seek(pStream, iSeekPos, STREAM_SEEK_SET, NULL); 6816 6816 IStream_Read(pStream, &CompObj.dwCLSIDNameLength, sizeof(CompObj.dwCLSIDNameLength), NULL); 6817 iSeekPos. s.LowPart = CompObj.dwCLSIDNameLength;6817 iSeekPos.DUMMYSTRUCTNAME_DOT LowPart = CompObj.dwCLSIDNameLength; 6818 6818 IStream_Seek(pStream, iSeekPos, STREAM_SEEK_CUR , NULL); 6819 6819 IStream_Read(pStream, &CompObj.dwOleTypeNameLength, sizeof(CompObj.dwOleTypeNameLength), NULL); 6820 iSeekPos. s.LowPart = CompObj.dwOleTypeNameLength;6820 iSeekPos.DUMMYSTRUCTNAME_DOT LowPart = CompObj.dwOleTypeNameLength; 6821 6821 IStream_Seek(pStream, iSeekPos, STREAM_SEEK_CUR , NULL); 6822 6822 … … 6957 6957 strcpy(pOleStreamData[1].strOleTypeName, strMetafilePictName); 6958 6958 6959 iSeekPos. s.HighPart = 0;6960 iSeekPos. s.LowPart = sizeof(olePress.byUnknown1);6959 iSeekPos.DUMMYSTRUCTNAME_DOT HighPart = 0; 6960 iSeekPos.DUMMYSTRUCTNAME_DOT LowPart = sizeof(olePress.byUnknown1); 6961 6961 6962 6962 /* Get Presentation Data */
Note:
See TracChangeset
for help on using the changeset viewer.