File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ comptime {
5050 }
5151}
5252
53- fn panicLocateFunction (name : []const u8 ) noreturn {
53+ fn panicLocateFunction (path : [] const u16 , name : []const u8 ) noreturn {
5454 @branchHint (.cold );
55- std .debug .panic ("Failed to locate function {s}" , .{name });
55+ std .debug .panic ("Failed to locate function {s} in {s} " , .{ name , std . unicode . fmtUtf16Le ( path ) });
5656}
5757
58- fn loadFunctions (dll : std.os.windows.HMODULE ) void {
58+ fn loadFunctions (dll : std.os.windows.HMODULE , path : [] const u16 ) void {
5959 inline for (comptime std .meta .fieldNames (ProxyFuncAddrs )) | field | {
6060 @field (proxy_func_addrs , field ) = std .os .windows .kernel32 .GetProcAddress (dll , field ) orelse {
61- panicLocateFunction (field );
61+ panicLocateFunction (path , field );
6262 };
6363 }
6464}
@@ -110,7 +110,7 @@ pub fn loadProxy(module: std.os.windows.HMODULE) !void {
110110
111111 const handle = try std .os .windows .LoadLibraryW (sys_full_path );
112112
113- loadFunctions (handle );
113+ loadFunctions (handle , sys_full_path );
114114}
115115
116116test {
You can’t perform that action at this time.
0 commit comments