MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / IL_Create

Function IL_Create

src/Dlapi.c:1466–1493  ·  view source on GitHub ↗

============================================================================= IL_Create() Creates an ITEMIDLIST by concatenating pidl1 and pidl2 cb1 and cb2 indicate the sizes of the pidls, where cb1 can be zero and pidl1 can be NULL If cb2 is zero, the size of pidl2 is retrieved using IL_GetSize(pidl2)

Source from the content-addressed store, hash-verified

1464// IL_GetSize(pidl2)
1465//
1466LPITEMIDLIST IL_Create(LPCITEMIDLIST pidl1,UINT cb1,
1467 LPCITEMIDLIST pidl2,UINT cb2)
1468{
1469
1470 LPITEMIDLIST pidl;
1471
1472 if (!pidl2)
1473 return NULL;
1474
1475 if (!cb2)
1476 cb2 = IL_GetSize(pidl2) + 2; // Space for terminating Bytes
1477
1478 if (!cb1)
1479 cb1 = IL_GetSize(pidl1);
1480
1481 // Allocate Memory
1482 pidl = CoTaskMemAlloc(cb1 + cb2);
1483
1484 // Init new ITEMIDLIST
1485 if (pidl1)
1486 CopyMemory(pidl,pidl1,cb1);
1487
1488 // pidl2 can't be NULL here
1489 CopyMemory((LPBYTE)pidl + cb1,pidl2,cb2);
1490
1491 return pidl;
1492
1493}
1494
1495
1496//=============================================================================

Callers 1

DirList_IconThreadFunction · 0.85

Calls 1

IL_GetSizeFunction · 0.85

Tested by

no test coverage detected