FFI Definitions of Windows win32 api for koffi
Compile successfully with
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)