@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
31 lines (28 loc) • 999 B
JavaScript
import koffi from 'koffi';
import '../@types/point.js';
import '../@types/rect.js';
import { HDC, HWND, INT, DWORD, LPCWSTR, HMENU, HINSTANCE, LPVOID, LRESULT, UINT, WPARAM, LPARAM, BOOL } from '../@types/win32.js';
const user32 = koffi.load('user32.dll');
function MAKELPARAM(low, high) {
return (low & 0xffff) | ((high & 0xffff) << 16);
}
const GetDC = user32.func('__stdcall', 'GetDC', HDC, [HWND]);
const ReleaseDC = user32.func('__stdcall', 'ReleaseDC', INT, [HWND, HDC]);
const CreateWindowExW = user32.func('__stdcall', 'CreateWindowExW', HWND, [
DWORD,
LPCWSTR,
LPCWSTR,
DWORD,
INT,
INT,
INT,
INT,
HWND,
HMENU,
HINSTANCE,
LPVOID,
]);
const SendMessageW = user32.func('__stdcall', 'SendMessageW', LRESULT, [HWND, UINT, WPARAM, LPARAM]);
const DestroyWindow = user32.func('__stdcall', 'DestroyWindow', BOOL, [HWND]);
export { CreateWindowExW, DestroyWindow, GetDC, MAKELPARAM, ReleaseDC, SendMessageW };
//# sourceMappingURL=user32.js.map