commit 60982ea5bd05695a0e97205cf3de223bd9111767 (tree)
parent d787b78d2c7e4d6264a27308995e522614e03a7f
Author: Carl Ã…stholm <carl@astholm.se>
Date: Wed, 20 Dec 2023 22:38:28 +0100
Correct `CreateProcessW` parameter types
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
@@ -1727,14 +1727,14 @@ pub const CreateProcessError = error{
};
pub fn CreateProcessW(
- lpApplicationName: ?LPWSTR,
- lpCommandLine: LPWSTR,
+ lpApplicationName: ?LPCWSTR,
+ lpCommandLine: ?LPWSTR,
lpProcessAttributes: ?*SECURITY_ATTRIBUTES,
lpThreadAttributes: ?*SECURITY_ATTRIBUTES,
bInheritHandles: BOOL,
dwCreationFlags: DWORD,
lpEnvironment: ?*anyopaque,
- lpCurrentDirectory: ?LPWSTR,
+ lpCurrentDirectory: ?LPCWSTR,
lpStartupInfo: *STARTUPINFOW,
lpProcessInformation: *PROCESS_INFORMATION,
) CreateProcessError!void {
diff --git a/lib/std/os/windows/kernel32.zig b/lib/std/os/windows/kernel32.zig
@@ -116,14 +116,14 @@ pub extern "kernel32" fn CreateNamedPipeW(
) callconv(WINAPI) HANDLE;
pub extern "kernel32" fn CreateProcessW(
- lpApplicationName: ?LPWSTR,
- lpCommandLine: LPWSTR,
+ lpApplicationName: ?LPCWSTR,
+ lpCommandLine: ?LPWSTR,
lpProcessAttributes: ?*SECURITY_ATTRIBUTES,
lpThreadAttributes: ?*SECURITY_ATTRIBUTES,
bInheritHandles: BOOL,
dwCreationFlags: DWORD,
lpEnvironment: ?*anyopaque,
- lpCurrentDirectory: ?LPWSTR,
+ lpCurrentDirectory: ?LPCWSTR,
lpStartupInfo: *STARTUPINFOW,
lpProcessInformation: *PROCESS_INFORMATION,
) callconv(WINAPI) BOOL;