These functions provide access to the shells task allocator
These functions allocate memory on the shells shared heap
ILGlobalClone
ILGlobalFree
SHAllocShared
SHFreeShared
SHLockShared
SHUnlockShared
These functions help with manipulating ItemIDs and IDLists
ILClone
ILFree
ILGlobalClone
ILGlobalFree
Makes a copy of an Itemidlist.
LPITEMIDLIST ILClone(
LPCITEMIDLIST pidl
)
If the function succeeds, the return value is a pointer to the new Itemidlist.
If the function fails, the return value is zero.
The ITEMIDLIST should be freed using ILFree.
Module | shell32.dll |
---|---|
Ordinal | 18 |
Platform | Available on NT/2000 and 95/98 |
Makes a copy of an Itemidlist in the shells global heap.
LPITEMIDLIST ILGlobalClone(
LPCITEMIDLIST pidl
)
If the function succeeds, the return value is a pointer to the new Itemidlist.
If the function fails, the return value is NULL.
The ITEMIDLIST should be freed using ILGlobalFree.
This function operates diffrently on Windows NT and Windows 95/98:
On Windows 95/98 this function allocates the ITEMIDLIST on a special heap the shell keeps that is shared to all processes. Pointers to objects in this heap can be directly passed to other processes.
Windows NT does not implement the same shared heap, and the ILGlobal* functions act exactly like their non-global counterparts. To allocate ITEMIDLISTs that can be passed to other processes on Windows NT/2000 use the SHAllocShared API.
Module | shell32.dll |
---|---|
Ordinal | 20 |
Platform | Implemented differently on NT/2000 and 95/98 |
Frees memory allocated using the shells task allocator
BOOL ILFree(
LPITEMIDLIST pidl
)
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
This function is a simple wrapper around SHFree.
Module | shell32.dll |
---|---|
Ordinal | 155 |
Platform | Available on NT/2000 and 95/98 |
Frees memory allocated using ILGlobalAlloc
BOOL ILGlobalFree(
LPITEMIDLIST pidl
)
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
See the remarks for ILGlobalClone.
Module | shell32.dll |
---|---|
Ordinal | 156 |
Platform | Implemented diffrently on NT/2000 and 95/98 |
Frees memory allocated using the shells task allocator
BOOL SHFree(
LPVOID pv
)
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Module | shell32.dll |
---|---|
Ordinal | 195 |
Platform | Available on NT/2000 and 95/98 |
Allocates memory using the shell allocator
LPVOID SHAlloc(
ULONG cb
)
If successfull, SHAlloc returns a pointer to the allocated memory block.
If the request cannot be satisfied, SHAlloc return NULL.
This provides quicker access to the task allocator obtained by calling SHGetMalloc.
Module | shell32.dll |
---|---|
Ordinal | 196 |
Platform | Available on NT/2000 and 95/98 |
Allocates memory in the shells shared memory pool.
HANDLE SHAllocShared(
LPVOID pvInit,
ULONG cb,
DWORD dwProcessId
)
If successfull, SHAllocShared returns a handle to the allocated memory block.
If the request cannot be satisfied, SHAllocShared return NULL.
The shared pool is a pool of memory available to the shell in every process. When passing IDLists via DDE or on the command line, the shell allocates the memory in the shared pool.
Module | shell32.dll |
---|---|
Ordinal | 520 |
Platform | Available on NT/2000 |
Obtains a pointer to allocated using SHAllocShared.
LPVOID SHLockShared(
HANDLE hShared,
DWORD dwProcessId
)
If the function succeeds, the return value is a pointer to the memory block.
Module | shell32.dll |
---|---|
Ordinal | 521 |
Platform | Available only on NT/2000 |
Frees a pointer to allocated using SHLockShared.
BOOL SHUnlockShared(
LPVOID pv
)
If the function succeeds, the return value is nonzero.
Module | shell32.dll |
---|---|
Ordinal | 522 |
Platform | Available only on NT/2000 |
Frees memory allocated using SHAllocShared.
BOOL SHFreeShared(
HANDLE hShared,
DWORD dwProcessId
)
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The shared memory must be locked when SHFreeShared is called.
Module | shell32.dll |
---|---|
Ordinal | 523 |
Platform | Available only on NT/2000 |