Beispiel #1
0
        public static unsafe string SHGetPathFromIDList(ITEMIDLIST* pidl)
        {
            char* pszPath = stackalloc char[Kernel32.MAX_PATH + 1];
            if (!SHGetPathFromIDList(pidl, pszPath))
            {
                throw new ArgumentException();
            }

            return new string(pszPath);
        }
Beispiel #2
0
 public static extern unsafe HResult SHGetKnownFolderIDList(
     [MarshalAs(UnmanagedType.LPStruct)] Guid rfid,
     KNOWN_FOLDER_FLAG dwFlags,
     IntPtr hToken,
     out ITEMIDLIST* pidl);
Beispiel #3
0
 public static extern unsafe bool SHGetPathFromIDList(
     ITEMIDLIST* pidl,
     [Friendly(FriendlyFlags.Array)] char* pszPath);
Beispiel #4
0
 public static extern unsafe HResult SHGetFolderLocation(
     IntPtr hwndOwner,
     CSIDL nFolder,
     IntPtr hToken,
     int dwReserved,
     out ITEMIDLIST* pidl);