diff --git a/packages/win32-api/src/lib/kernel32/api.def.ts b/packages/win32-api/src/lib/kernel32/api.def.ts index c289f5e6..56725cd6 100644 --- a/packages/win32-api/src/lib/kernel32/api.def.ts +++ b/packages/win32-api/src/lib/kernel32/api.def.ts @@ -25,6 +25,9 @@ export class DefKernel32 implements T.LibDefBase { static GetProcessHeaps = [D.DWORD, [D.DWORD, D.PHANDLE]] + /** https://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress */ + static GetProcAddress = ['intptr_t', [D.HMODULE, D.WString]] // FARPROC + static GetSystemTimes = [D.BOOL, [`_Out_ ${S.LPFILETIME}`, `_Out_ ${S.LPFILETIME}`, `_Out_ ${S.LPFILETIME}`]] /** https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount */ diff --git a/packages/win32-api/src/lib/kernel32/api.types.ts b/packages/win32-api/src/lib/kernel32/api.types.ts index d28bd04a..8a9adeb7 100644 --- a/packages/win32-api/src/lib/kernel32/api.types.ts +++ b/packages/win32-api/src/lib/kernel32/api.types.ts @@ -42,6 +42,9 @@ export class Kernel32 implements T.LibDef2Type { OpenProcess: (dwDesiredAccess: T.DWORD, bInheritHandle: T.BOOL, dwProcessId: T.DWORD) => T.HANDLE + /** https://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress */ + GetProcAddress: (hModule: T.HMODULE, lpProcName: T.WString) => T.INT_PTR + /** https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw */ LoadLibraryExW: (lpLibFileName: T.WString, hFile: T.HANDLE, dwFlags: T.DWORD) => T.HMODULE