authorgravatar for pyrogx1133@gmail.comRonald Chen <pyrogx1133@gmail.com> 2024-05-11 20:02:28-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-22 07:04:35-07:00
log52150b701cc5dae8864c908a6003d8dbe6b4d7b9
treeb86060dd654fd89395bfd0f54bcd4d22acbd24c1
parent869880adac4f708b0fd1e65de6046b561c38528c

[std] Fixed bug missing optional for lpName param on CreateEventExW. fixes #19946

https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createeventexw

2 files changed, 2 insertions(+), 2 deletions(-)

lib/std/os/windows.zig+1-1
......@@ -304,7 +304,7 @@ pub fn CreateEventEx(attributes: ?*SECURITY_ATTRIBUTES, name: []const u8, flags:
304304 return CreateEventExW(attributes, nameW.span().ptr, flags, desired_access);
305305}
306306
307pub fn CreateEventExW(attributes: ?*SECURITY_ATTRIBUTES, nameW: [*:0]const u16, flags: DWORD, desired_access: DWORD) !HANDLE {
307pub fn CreateEventExW(attributes: ?*SECURITY_ATTRIBUTES, nameW: ?LPCWSTR, flags: DWORD, desired_access: DWORD) !HANDLE {
308308 const handle = kernel32.CreateEventExW(attributes, nameW, flags, desired_access);
309309 if (handle) |h| {
310310 return h;
lib/std/os/windows/kernel32.zig+1-1
......@@ -82,7 +82,7 @@ pub extern "kernel32" fn SetEndOfFile(hFile: HANDLE) callconv(WINAPI) BOOL;
8282
8383pub extern "kernel32" fn CreateEventExW(
8484 lpEventAttributes: ?*SECURITY_ATTRIBUTES,
85 lpName: [*:0]const u16,
85 lpName: ?LPCWSTR,
8686 dwFlags: DWORD,
8787 dwDesiredAccess: DWORD,
8888) callconv(WINAPI) ?HANDLE;