private SHGetIDListFromObject ( |
||
iUnknown | ||
ppidl | ||
Résultat | int |
internal static IntPtr PidlFromUnknown(IntPtr unknown) { IntPtr pidl; int retCode = ShellNativeMethods.SHGetIDListFromObject(unknown, out pidl); return(CoreErrorHelper.Succeeded(retCode) ? pidl : IntPtr.Zero); }
internal static IntPtr PidlFromShellItem(IShellItem nativeShellItem) { IntPtr shellItem = Marshal.GetComInterfaceForObject(nativeShellItem, typeof(IShellItem)); IntPtr pidl; int retCode = ShellNativeMethods.SHGetIDListFromObject(shellItem, out pidl); return(CoreErrorHelper.Succeeded(retCode) ? pidl : IntPtr.Zero); }