Skip to content

Commit

Permalink
Add hinstdll forward to runtime globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelimion committed Jul 10, 2024
1 parent b02291b commit c49afb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions base/runtime/core.odin
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ when ODIN_OS == .Windows {
Thread_Detach = 3,
}
dll_forward_reason: DLL_Forward_Reason

dll_instance: rawptr
}

// IMPORTANT NOTE(bill): Must be in this order (as the compiler relies upon it)
Expand Down
3 changes: 2 additions & 1 deletion base/runtime/entry_windows.odin
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ when ODIN_BUILD_MODE == .Dynamic {
DllMain :: proc "system" (hinstDLL: rawptr, fdwReason: u32, lpReserved: rawptr) -> b32 {
context = default_context()

// Populate Windows DLL-specific global
// Populate Windows DLL-specific globals
dll_forward_reason = DLL_Forward_Reason(fdwReason)
dll_instance = hinstDLL

switch dll_forward_reason {
case .Process_Attach:
Expand Down

0 comments on commit c49afb0

Please sign in to comment.