Skip to content

Commit c77afca

Browse files
Pyrolisticalkubkon
authored andcommitted
[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
1 parent 084c2cd commit c77afca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/std/os/windows.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -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

307-
pub fn CreateEventExW(attributes: ?*SECURITY_ATTRIBUTES, nameW: [*:0]const u16, flags: DWORD, desired_access: DWORD) !HANDLE {
307+
pub 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
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub extern "kernel32" fn SetEndOfFile(hFile: HANDLE) callconv(WINAPI) BOOL;
8282

8383
pub 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;

0 commit comments

Comments
 (0)