Add several NT functions (#1318)

With these addtions, I could build and run a
[sokol](https://github.com/floooh/sokol) application (using OpenGL) on
both Linux and Windows.
This commit is contained in:
Bach Le 2024-10-28 12:10:32 +08:00 committed by GitHub
parent 4e44517c9c
commit baad1df71d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 618 additions and 0 deletions

View file

@ -186,6 +186,8 @@ imp 'GetWindowsDirectoryA' GetWindowsDirectoryA kernel32 2
imp 'GlobalAlloc' GlobalAlloc kernel32 2
imp 'GlobalFree' GlobalFree kernel32 1
imp 'GlobalMemoryStatusEx' GlobalMemoryStatusEx kernel32 1
imp 'GlobalLock' GlobalLock kernel32 1
imp 'GlobalUnlock' GlobalUnlock kernel32 1
imp 'HeapAlloc' HeapAlloc kernel32 3
imp 'HeapCompact' HeapCompact kernel32 2
imp 'HeapCreate' HeapCreate kernel32 3
@ -376,6 +378,7 @@ imp 'TraceSetInformation' TraceSetInformation advapi32 # Windows 7+
#
# Name Actual DLL Arity
imp 'AdjustWindowRect' AdjustWindowRect user32 3
imp 'AdjustWindowRectEx' AdjustWindowRectEx user32 4
imp 'AnimateWindow' AnimateWindow user32 3
imp 'AppendMenuA' AppendMenuA user32 4
imp 'AppendMenu' AppendMenuW user32 4
@ -383,6 +386,9 @@ imp 'BeginPaint' BeginPaint user32 2
imp 'BringWindowToTop' BringWindowToTop user32 1
imp 'CallNextHookEx' CallNextHookEx user32 4
imp 'CloseWindow' CloseWindow user32 1
imp 'ClientToScreen' ClientToScreen user32 2
imp 'ClipCursor' ClipCursor user32 1
imp 'CloseClipboard' CloseClipboard user32 0
imp 'CreateIconIndirect' CreateIconIndirect user32 1
imp 'CreateMenu' CreateMenu user32 0
imp 'CreatePopupMenu' CreatePopupMenu user32 0
@ -395,12 +401,15 @@ imp 'DestroyWindow' DestroyWindow user32 1
imp 'DispatchMessage' DispatchMessageW user32 1
imp 'DrawText' DrawTextW user32 5
imp 'DrawTextEx' DrawTextExW user32 6
imp 'EmptyClipboard' EmptyClipboard user32 0
imp 'EndPaint' EndPaint user32 2
imp 'EnumChildWindows' EnumChildWindows user32 3
imp 'FillRect' FillRect user32 3
imp 'FindWindow' FindWindowW user32 2
imp 'FindWindowEx' FindWindowExW user32 4
imp 'GetAsyncKeyState' GetAsyncKeyState user32 1
imp 'GetClientRect' GetClientRect user32 2
imp 'GetClipboardData' GetClipboardData user32 1
imp 'GetCursor' GetCursor user32 0
imp 'GetCursorPos' GetCursorPos user32 1
imp 'GetDC' GetDC user32 1
@ -409,9 +418,12 @@ imp 'GetKeyState' GetKeyState user32 1
imp 'GetKeyboardLayout' GetKeyboardLayout user32 1
imp 'GetMenu' GetMenu user32 1
imp 'GetMessage' GetMessageW user32 4
imp 'GetMonitorInfo' GetMonitorInfoW user32 2
imp 'GetRawInputData' GetRawInputData user32 5
imp 'GetParent' GetParent user32 1
imp 'GetShellWindow' GetShellWindow user32 0
imp 'GetSystemMenu' GetSystemMenu user32 2
imp 'GetSystemMetrics' GetSystemMetrics user32 1
imp 'GetWindow' GetWindow user32 2
imp 'GetWindowPlacement' GetWindowPlacement user32 2
imp 'GetWindowRect' GetWindowRect user32 2
@ -432,13 +444,22 @@ imp 'MapVirtualKeyEx' MapVirtualKeyExW user32 3
imp 'MessageBox' MessageBoxW user32 4
imp 'MessageBoxEx' MessageBoxExW user32 5
imp 'MoveWindow' MoveWindow user32 6
imp 'MonitorFromPoint' MonitorFromPoint user32 2
imp 'MonitorFromWindow' MonitorFromWindow user32 2
imp 'OpenClipboard' OpenClipboard user32 1
imp 'PeekMessage' PeekMessageW user32 5
imp 'PostMessage' PostMessageW user32 4
imp 'PostQuitMessage' PostQuitMessage user32 1
imp 'PtInRect' PtInRect user32 2
imp 'RedrawWindow' RedrawWindow user32 4
imp 'RegisterClass' RegisterClassW user32 1
imp 'RegisterClassEx' RegisterClassExW user32 1
imp 'RegisterRawInputDevices' RegisterRawInputDevices user32 3
imp 'ReleaseCapture' ReleaseCapture user32 0
imp 'ReleaseDC' ReleaseDC user32 2
imp 'ScreenToClient' ScreenToClient user32 2
imp 'SetClipboardData' SetClipboardData user32 2
imp 'SetCursorPos' SetCursorPos user32 2
imp 'SendMessage' SendMessageW user32 4
imp 'SetCapture' SetCapture user32 1
imp 'SetClassLong' SetClassLongW user32 3
@ -446,6 +467,7 @@ imp 'SetCursor' SetCursor user32 1
imp 'SetParent' SetParent user32 2
imp 'SetTimer' SetTimer user32 4
imp 'SetWindowLong' SetWindowLongW user32 3
imp 'SetWindowLongPtr' SetWindowLongPtrW user32 3
imp 'SetWindowPlacement' SetWindowPlacement user32 2
imp 'SetWindowPos' SetWindowPos user32 7
imp 'SetWindowText' SetWindowTextW user32 2
@ -454,12 +476,23 @@ imp 'SetWindowsHookEx' SetWindowsHookExW user32 4
imp 'ShowCaret' ShowCaret user32 1
imp 'ShowCursor' ShowCursor user32 1
imp 'ShowWindow' ShowWindow user32 2
imp 'TrackMouseEvent' TrackMouseEvent user32 1
imp 'TrackPopupMenu' TrackPopupMenu user32 7
imp 'TranslateMessage' TranslateMessage user32 1
imp 'UnhookWindowsHook' UnhookWindowsHook user32 2
imp 'UnhookWindowsHookEx' UnhookWindowsHookEx user32 1
imp 'UnregisterClass' UnregisterClassW user32 2
imp 'UpdateWindow' UpdateWindow user32 1
imp 'WaitForInputIdle' WaitForInputIdle user32 2
imp 'WindowFromPoint' WindowFromPoint user32 1
# SHELL32.DLL
#
# Name Actual DLL Arity
imp 'CommandLineToArgv' CommandLineToArgvW shell32 2
imp 'DragAcceptFiles' DragAcceptFiles shell32 2
imp 'DragFinish' DragFinish shell32 1
imp 'DragQueryFile' DragQueryFileW shell32 4
# GDI32.DLL
#
@ -473,6 +506,7 @@ imp 'CreateDIBSection' CreateDIBSection gdi32 6
imp 'CreateRectRgn' CreateRectRgn gdi32 4
imp 'DeleteDC' DeleteDC gdi32 1
imp 'DeleteObject' DeleteObject gdi32 1
imp 'DescribePixelFormat' DescribePixelFormat gdi32 4
imp 'GetPixel' GetPixel gdi32 3
imp 'RestoreDC' RestoreDC gdi32 2
imp 'SaveDC' SaveDC gdi32 1