Merge pull request #5903 from BNTB/master

Add FreeLibraryAndExitThread in kernel32. Add EnumProcessModules in psapi (new file).
This commit is contained in:
gingerBill
2025-11-11 21:22:16 +00:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -489,6 +489,7 @@ foreign kernel32 {
LoadLibraryW :: proc(c_str: LPCWSTR) -> HMODULE ---
LoadLibraryExW :: proc(c_str: LPCWSTR, hFile: HANDLE, dwFlags: LoadLibraryEx_Flags) -> HMODULE ---
FreeLibrary :: proc(h: HMODULE) -> BOOL ---
FreeLibraryAndExitThread :: proc(hLibModule: HMODULE, dwExitCode: DWORD) -> VOID ---
GetProcAddress :: proc(h: HMODULE, c_str: LPCSTR) -> rawptr ---
LoadResource :: proc(hModule: HMODULE, hResInfo: HRSRC) -> HGLOBAL ---

View File

@@ -0,0 +1,9 @@
#+build windows
package sys_windows
foreign import psapi "system:Psapi.lib"
@(default_calling_convention="system")
foreign psapi {
EnumProcessModules :: proc(hProcess: HANDLE, lphModule: ^HMODULE, cb: DWORD, lpcbNeeded: LPDWORD) -> BOOL ---
}