Home

Awesome

win32-api

FFI Definitions of Windows win32 api for koffi

GitHub tag License Available platform ci codecov Conventional Commits lerna

Significant Changes.V22

Compile successfully with

Migrate to v13

See migrate13

Packages

PackageVersion
win32-apimain-svg
win32-defdef-svg

What can I do with this?

Calling win32 native functions come from user32.dll, kernel32.dll, comctl32.dll by Node.js via node-ffi-napi

Installing

npm install win32-api

Usage

DLL Wrapper

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)

Demo

Relevant

License

MIT

Languages