#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "objbase.h"
#include "shlobj.h"
#include "wine/debug.h"
Go to the source code of this file.
◆ CLIST_ID_CONTAINER
| #define CLIST_ID_CONTAINER (~0U) |
◆ COBJMACROS
◆ NextItem()
◆ SHAddDataBlock()
Definition at line 68 of file clist.c.
69{
72
73 TRACE(
"(%p,%p)\n", lppList, lpNewItem);
74
75 if(!lppList || !lpNewItem)
77
81
82 ulSize = lpNewItem->
cbSize;
83
84 if(ulSize & 0x3)
85 {
86
88 TRACE(
"Creating container item, new size = %d\n", ulSize);
89 }
90
91 if(!*lppList)
92 {
93
95 lpInsertAt = *lppList;
96 }
97 else
98 {
99
100 ULONG ulTotalSize = 0;
102
103
105 {
106 ulTotalSize += lpIter->
cbSize;
108 }
109
110
113 if(lpIter)
114 {
115 *lppList = lpIter;
117 }
118 }
119
120 if(lpInsertAt)
121 {
122
124
125 if(ulSize != lpNewItem->
cbSize)
126 {
127 lpInsertAt->
cbSize = ulSize;
129 lpDest++;
130 }
132
133
136
138 }
140}
static LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
#define CLIST_ID_CONTAINER
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
#define memcpy(s1, s2, n)
struct tagDATABLOCKHEADER * LPDATABLOCK_HEADER
struct tagDATABLOCKHEADER DATABLOCK_HEADER
Referenced by CShellLink::AddDataBlock(), and SHReadDataBlockList().
◆ SHFindDataBlock()
Definition at line 424 of file clist.c.
425{
426 TRACE(
"(%p,%d)\n", lpList, dwSignature);
427
428 if(lpList)
429 {
431 {
433 return lpList;
435 return lpList + 1;
436
438 }
439 }
441}
Referenced by CShellLink::CopyDataBlock(), CShellLink::GetAdvertiseInfo(), CShellLink::GetIconLocation(), CShellLink::GetPath(), CShellLink::Load(), CShellLink::SetIconLocation(), CShellLink::SetPath(), and CShellLink::WriteAdvertiseInfo().
◆ SHFreeDataBlockList()
◆ SHReadDataBlockList()
Definition at line 235 of file clist.c.
236{
238 ULONG ulBuffSize =
sizeof(bBuff);
240 ULONG ulRead, ulSize;
242
243 TRACE(
"(%p,%p)\n", lpStream, lppList);
244
245 if(*lppList)
246 {
247
250 }
251
252 do
253 {
254
255 hRet = IStream_Read(lpStream, &ulSize,sizeof(ulSize),&ulRead);
256
257 if(
FAILED(hRet) || ulRead !=
sizeof(ulSize) || !ulSize)
258 break;
259
260 if(ulSize > 0xFFFF)
261 {
264
266
267
268 if(
SUCCEEDED(IStream_Seek(lpStream, liZero, STREAM_SEEK_CUR, &ulPos)))
269 {
271 IStream_Seek(lpStream, liZero, STREAM_SEEK_SET,
NULL);
272 }
273 break;
274 }
276 {
277
278 if(ulSize > ulBuffSize)
279 {
280
282
283 if (pItem == bBuff)
285 else
287
288 if(!lpTemp)
289 {
291 break;
292 }
293 ulBuffSize = ulSize;
294 pItem = lpTemp;
295 }
296
298 ulSize -=
sizeof(pItem->
cbSize);
299
300
301 hRet = IStream_Read(lpStream, &pItem->
dwSignature, ulSize, &ulRead);
302
303 if(
FAILED(hRet) || ulRead != ulSize)
304 break;
305
307 }
308 } while(1);
309
310
311 if(pItem != bBuff)
313
314 return hRet;
315}
BOOL WINAPI SHAddDataBlock(LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
Referenced by DumpCommand(), and CShellLink::Load().
◆ SHRemoveDataBlock()
Definition at line 355 of file clist.c.
356{
361
362 TRACE(
"(%p,%d)\n", lppList, dwSignature);
363
364 if(lppList && (lpList = *lppList))
365 {
366
368 {
371 {
372 lpItem = lpList;
373 break;
374 }
376 }
377 }
378
379 if(!lpItem)
381
383
384
387
388
390
391
392 memmove(lpItem, lpNext, (
char *)lpList - (
char *)lpNext +
sizeof(
ULONG));
393
394 if(ulNewSize <=
sizeof(
ULONG))
395 {
398 }
399 else
400 {
402 if(lpList)
403 *lppList = lpList;
404 }
406}
SIZE_T NTAPI LocalSize(HLOCAL hMem)
#define memmove(s1, s2, n)
Referenced by CShellLink::RemoveDataBlock().
◆ SHWriteDataBlockList()
Definition at line 179 of file clist.c.
180{
183
184 TRACE(
"(%p,%p)\n", lpStream, lpList);
185
186 if(lpList)
187 {
189 {
191
193 lpItem++;
194
195 hRet = IStream_Write(lpStream,lpItem,lpItem->
cbSize,&ulSize);
197 return hRet;
198
199 if(lpItem->
cbSize != ulSize)
201
203 }
204 }
205
207 {
209 ulSize = 0;
210
211
212 hRet = IStream_Write(lpStream, &ulSize,sizeof(ulSize),&ulDummy);
213 }
214
215 return hRet;
216}
Referenced by CShellLink::Save().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
shell |
| ) |
|