Class Pidl
Manages an ITEMIDLIST structure that is used to identify files and other shell objects instead of a file-system path.
public class Pidl : IDisposable
Remarks
Wraps an ITEMIDLIST*, also known as PIDL or LPITEMIDLIST.
When calling native shell API, virtual objects can be identified only by ITEMIDLIST*. Some API also support "parsing name", which may look like "::{CLSID-1}\::{CLSID-2}"
. File-system objects can be identified by path as well as by ITEMIDLIST*. URLs can be identified by URL as well as by ITEMIDLIST*.
The ITEMIDLIST structure is in unmanaged memory. You can dispose Pidl variables, or GC will do it later. Always dispose if creating many.
This class has only ITEMIDLIST functions that are used in this library. Look for other functions on the Internet. Many of them are named with IL prefix, like ILClone, ILGetSize, ILFindLastID.
Namespace: Au.Types
Assembly: Au.dll
Constructors
Name | Description |
---|---|
Pidl(nint) | Assigns an ITEMIDLIST to this variable. |
Pidl(nint, nint) | Combines two ITEMIDLIST (parent and child) and assigns the result to this variable. |
Properties
Name | Description |
---|---|
HandleRef | Gets the ITEMIDLIST*. |
IsNull | Returns |
UnsafePtr | Gets the ITEMIDLIST*. |
Methods
Name | Description |
---|---|
Detach() | Gets the ITEMIDLIST and clears this variable so that it cannot be used and will not free the ITEMIDLIST memory. To free it use System.Runtime.InteropServices.Marshal.FreeCoTaskMem. |
Dispose() | Frees the ITEMIDLIST with Marshal.FreeCoTaskMem and clears this variable. |
Dispose(bool) | |
FromString(string, bool) | Converts string to ITEMIDLIST and creates new Pidl variable that holds it. |
ToHexString() | Returns string |
ToHexString(nint) | Returns string |
ToShellString(SIGDN, bool) | Converts the ITEMIDLIST to file path or URL or shell object parsing name or display name, depending on stringType. |
ToShellString(nint, SIGDN, bool) | Converts an ITEMIDLIST to file path or URL or shell object parsing name or display name, depending on stringType. |
ToString() | Converts the ITEMIDLIST to string.
If it identifies an existing file-system object (file or directory), returns path. If URL, returns URL. Else returns |
ToString(nint) | This overload uses an ITEMIDLIST* that is not stored in a Pidl variable. |
ValueEquals(nint) | Returns |