Skip to content

Commit 03e5dfa

Browse files
authored
Update Win32Helper.Shell.cs
1 parent 5702295 commit 03e5dfa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Files.App/Helpers/Win32/Win32Helper.Shell.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ public static partial class Win32Helper
8282

8383
public static string GetFolderFromKnownFolderGUID(Guid guid)
8484
{
85-
IntPtr pPath;
86-
Win32PInvoke.SHGetKnownFolderPath(guid, 0, IntPtr.Zero, out pPath);
87-
string path = Marshal.PtrToStringUni(pPath);
88-
Marshal.FreeCoTaskMem(pPath);
85+
nint pszPath;
86+
Win32PInvoke.SHGetKnownFolderPath(guid, 0, nint.Zero, out pszPath);
87+
string path = Marshal.PtrToStringUni(pszPath);
88+
Marshal.FreeCoTaskMem(pszPath);
89+
8990
return path;
9091
}
9192
}

0 commit comments

Comments
 (0)