35#define CLIST_ID_CONTAINER (~0U)
73 TRACE(
"(%p,%p)\n", lppList, lpNewItem);
75 if(!lppList || !lpNewItem)
82 ulSize = lpNewItem->
cbSize;
88 TRACE(
"Creating container item, new size = %d\n", ulSize);
95 lpInsertAt = *lppList;
100 ULONG ulTotalSize = 0;
106 ulTotalSize += lpIter->
cbSize;
125 if(ulSize != lpNewItem->
cbSize)
127 lpInsertAt->
cbSize = ulSize;
184 TRACE(
"(%p,%p)\n", lpStream, lpList);
195 hRet = IStream_Write(lpStream,lpItem,lpItem->
cbSize,&ulSize);
199 if(lpItem->
cbSize != ulSize)
212 hRet = IStream_Write(lpStream, &ulSize,
sizeof(ulSize),&ulDummy);
238 ULONG ulBuffSize =
sizeof(bBuff);
240 ULONG ulRead, ulSize;
243 TRACE(
"(%p,%p)\n", lpStream, lppList);
255 hRet = IStream_Read(lpStream, &ulSize,
sizeof(ulSize),&ulRead);
257 if(
FAILED(hRet) || ulRead !=
sizeof(ulSize) || !ulSize)
268 if(
SUCCEEDED(IStream_Seek(lpStream, liZero, STREAM_SEEK_CUR, &ulPos)))
271 IStream_Seek(lpStream, liZero, STREAM_SEEK_SET,
NULL);
278 if(ulSize > ulBuffSize)
298 ulSize -=
sizeof(pItem->
cbSize);
301 hRet = IStream_Read(lpStream, &pItem->
dwSignature, ulSize, &ulRead);
303 if(
FAILED(hRet) || ulRead != ulSize)
333 TRACE(
"(%p)\n", lpList);
362 TRACE(
"(%p,%d)\n", lppList, dwSignature);
364 if(lppList && (lpList = *lppList))
392 memmove(lpItem, lpNext, (
char *)lpList - (
char *)lpNext +
sizeof(
ULONG));
394 if(ulNewSize <=
sizeof(
ULONG))
426 TRACE(
"(%p,%d)\n", lpList, dwSignature);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
DATABLOCK_HEADER *WINAPI SHFindDataBlock(LPDBLIST lpList, DWORD dwSignature)
HRESULT WINAPI SHReadDataBlockList(IStream *lpStream, LPDBLIST *lppList)
VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList)
BOOL WINAPI SHAddDataBlock(LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
HRESULT WINAPI SHWriteDataBlockList(IStream *lpStream, LPDBLIST lpList)
static LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
#define CLIST_ID_CONTAINER
BOOL WINAPI SHRemoveDataBlock(LPDBLIST *lppList, DWORD dwSignature)
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI LocalSize(HLOCAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
struct tagDATABLOCKHEADER * LPDATABLOCK_HEADER
struct tagDATABLOCKHEADER DATABLOCK_HEADER