From 3ccc1867c86aa0e21177420bba879495654b1b09 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 9 Jun 2024 20:03:14 +0200 Subject: work towards hooks --- src/northstar.zig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/northstar.zig') diff --git a/src/northstar.zig b/src/northstar.zig index 8c659a7..10fd21b 100644 --- a/src/northstar.zig +++ b/src/northstar.zig @@ -7,13 +7,11 @@ pub const NorthstarData = extern struct { handle: ?windows.HMODULE, }; -pub var data: NorthstarData = .{ - .handle = null, -}; +pub var plugin_handle: ?windows.HMODULE = null; -pub var create_interface: ?*const fn ([*:0]const u8, ?*const interface.InterfaceStatus) callconv(.C) *anyopaque = null; +pub var create_interface: interface.GetInterfaceType = null; pub fn init(ns_module: windows.HMODULE, init_data: *NorthstarData) void { create_interface = @ptrCast(windows.kernel32.GetProcAddress(ns_module, "CreateInterface")); - data.handle = init_data.*.handle; + plugin_handle = init_data.*.handle; } -- cgit v1.2.3