authorgravatar for pyrogx1133@gmail.comRonald Chen <pyrogx1133@gmail.com> 2024-05-11 20:02:28-07:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-05-12 07:45:40+02:00
logc77afca957b53f148b566a2b0d1f7e582a0888de
tree5ccfe7f645c17990e28ab9ca96b9a660b4ad8a65
parent084c2cd90f79d5e7edf76b7ddd390adb95a27f0c

[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:...@@ -304,7 +304,7 @@ pub fn CreateEventEx(attributes: ?*SECURITY_ATTRIBUTES, name: []const u8, flags:
304 return CreateEventExW(attributes, nameW.span().ptr, flags, desired_access);304 return CreateEventExW(attributes, nameW.span().ptr, flags, desired_access);
305}305}
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 {
308 const handle = kernel32.CreateEventExW(attributes, nameW, flags, desired_access);308 const handle = kernel32.CreateEventExW(attributes, nameW, flags, desired_access);
309 if (handle) |h| {309 if (handle) |h| {
310 return h;310 return h;
lib/std/os/windows/kernel32.zig+1-1
...@@ -82,7 +82,7 @@ pub extern "kernel32" fn SetEndOfFile(hFile: HANDLE) callconv(WINAPI) BOOL;...@@ -82,7 +82,7 @@ pub extern "kernel32" fn SetEndOfFile(hFile: HANDLE) callconv(WINAPI) BOOL;
8282
83pub extern "kernel32" fn CreateEventExW(83pub extern "kernel32" fn CreateEventExW(
84 lpEventAttributes: ?*SECURITY_ATTRIBUTES,84 lpEventAttributes: ?*SECURITY_ATTRIBUTES,
85 lpName: [*:0]const u16,85 lpName: ?LPCWSTR,
86 dwFlags: DWORD,86 dwFlags: DWORD,
87 dwDesiredAccess: DWORD,87 dwDesiredAccess: DWORD,
88) callconv(WINAPI) ?HANDLE;88) callconv(WINAPI) ?HANDLE;