FFI Definitions of Windows win32 api for koffi
Significant Changes.V22
Compile successfully with
- Node.js v18
- Node.js v20
- Node.js v22
See migrate13
Package | Version |
---|---|
win32-api |
|
win32-def |
Calling win32 native functions come from user32.dll, kernel32.dll, comctl32.dll by Node.js via node-ffi-napi
npm install win32-api
import {
FindWindow,
GetDefaultPrinter,
} from 'win32-api/util'
// Retrieves the printer name of the default printer for the current user on the local computer
const printerName = await GetDefaultPrinter()
const child = spawn('notepad.exe')
const hWnd = await FindWindowEx(0, 0, 'Notepad', null)