Skip to content

Commit ae45b8b

Browse files
authored
Merge pull request odin-lang#5903 from BNTB/master
Add FreeLibraryAndExitThread in kernel32. Add EnumProcessModules in psapi (new file).
2 parents 33341c4 + 5869ef2 commit ae45b8b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/sys/windows/kernel32.odin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ foreign kernel32 {
489489
LoadLibraryW :: proc(c_str: LPCWSTR) -> HMODULE ---
490490
LoadLibraryExW :: proc(c_str: LPCWSTR, hFile: HANDLE, dwFlags: LoadLibraryEx_Flags) -> HMODULE ---
491491
FreeLibrary :: proc(h: HMODULE) -> BOOL ---
492+
FreeLibraryAndExitThread :: proc(hLibModule: HMODULE, dwExitCode: DWORD) -> VOID ---
492493
GetProcAddress :: proc(h: HMODULE, c_str: LPCSTR) -> rawptr ---
493494

494495
LoadResource :: proc(hModule: HMODULE, hResInfo: HRSRC) -> HGLOBAL ---

core/sys/windows/psapi.odin

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#+build windows
2+
package sys_windows
3+
4+
foreign import psapi "system:Psapi.lib"
5+
6+
@(default_calling_convention="system")
7+
foreign psapi {
8+
EnumProcessModules :: proc(hProcess: HANDLE, lphModule: ^HMODULE, cb: DWORD, lpcbNeeded: LPDWORD) -> BOOL ---
9+
}

0 commit comments

Comments
 (0)