diff --git a/src/Files.App.CsWin32/Extras.cs b/src/Files.App.CsWin32/Extras.cs index 422d9fbdfc68..15aad46052a4 100644 --- a/src/Files.App.CsWin32/Extras.cs +++ b/src/Files.App.CsWin32/Extras.cs @@ -44,6 +44,20 @@ public static unsafe nint SetWindowLongPtr(HWND hWnd, WINDOW_LONG_PTR_INDEX nInd public const int PixelFormat32bppARGB = 2498570; } + namespace Foundation + { + public partial struct PCWSTR + { + public static unsafe PCWSTR FromString(string value) + { + fixed (char* p = value) + { + return new PCWSTR(p); + } + } + } + } + namespace Extras { [GeneratedComInterface, Guid("EACDD04C-117E-4E17-88F4-D1B12B0E3D89"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]