Skip to content

Commit

Permalink
feat(api): user32 GetProcAddress()
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Jun 30, 2024
1 parent 2af86e0 commit 567b243
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions packages/win32-api/src/lib/user32/dict/G.def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ export class DefUser32_G extends DefUser32_F {
/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcursorpos */
static GetCursorPos = [D.BOOL, [`_Out_ ${S.LPPOINT}`]]

static GetForegroundWindow = [D.HWND, []]

/** https://learn.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-getclasslongptrw */
static GetClassLongPtrW = [D.ULONG_PTR, [D.HWND, D.INT]]

static GetForegroundWindow = [D.HWND, []]

/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew */
static GetMessageW = [D.BOOL, [`_Out_ ${S.LPMSG}`, D.HWND, D.UINT, D.UINT]]

static GetParent = [D.HWND, [D.HWND]]

/** https://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress */
static GetProcAddress = ['intptr_t', [D.HMODULE, D.WString]]
// static GetProcAddress = [D.FARPROC, [D.HMODULE, D.LPCSTR]]


/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getrawinputdata */
static GetRawInputData = [D.UINT, [S.LPRAWINPUT, D.UINT, D.LPVOID, `_Inout_ ${D.PUINT}`, D.UINT]]

Expand Down
7 changes: 5 additions & 2 deletions packages/win32-api/src/lib/user32/dict/G.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ export class User32_G extends User32_F {
/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcursorpos */
GetCursorPos: (lpPoint: S.POINT_Type) => T.BOOL

GetForegroundWindow: () => T.HWND

/** https://learn.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-getclasslongptrw */
GetClassLongPtrW: (hWnd: T.HWND, nIndex: T.INT) => T.ULONG_PTR

GetForegroundWindow: () => T.HWND

/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew */
GetMessageW: (lpMsg: S.MSG_Type, HWND: T.HWND, wMsgFilterMin: T.UINT, wMsgFilterMax: T.UINT) => T.BOOL

/** https://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress */
GetProcAddress: (hModule: T.HMODULE, lpProcName: T.WString) => T.INT_PTR

GetParent: (hWnd: T.HWND) => T.HWND

/** https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getrawinputdata */
Expand Down

0 comments on commit 567b243

Please sign in to comment.