Fix compile error due to GetModuleFileNameW binding change

In https://github.com/ziglang/zig/pull/19641, this binding changed from `[*]u16` to `LPWSTR` which made it a sentinel-terminated pointer. This introduced a compiler error in the `std.os.windows.GetModuleFileNameW` wrapper since it takes a `[*]u16` pointer. This commit changes the binding back to what it was before instead of introducing a breaking change to `std.os.windows.GetModuleFileNameW`

Related: https://github.com/ziglang/zig/issues/20858
This commit is contained in:
Ryan Liptak 2024-07-29 06:07:20 -07:00 committed by Andrew Kelley
parent d60c100eb6
commit efde3ed04a

View File

@ -597,7 +597,7 @@ pub extern "kernel32" fn GetProcessHeap() callconv(WINAPI) ?HANDLE;
// TODO: Wrapper around LdrGetDllFullName.
pub extern "kernel32" fn GetModuleFileNameW(
hModule: ?HMODULE,
lpFilename: LPWSTR,
lpFilename: [*]WCHAR,
nSize: DWORD,
) callconv(WINAPI) DWORD;