UNPKG

win32-api

Version:

FFI definitions of windows win32 api for node-ffi

15 lines 521 B
import assert from 'node:assert'; import { load } from '../../lib/winspool/index.js'; const funcName = 'ClosePrinter'; // type RetType = ReturnType<FnType> // type ParamType = Parameters<FnType> /** * @link https://learn.microsoft.com/zh-cn/windows/win32/printdocs/closeprinter */ export async function ClosePrinter(hwnd) { assert(hwnd, 'hwnd must be a valid handle'); const lib = load([funcName]); const res = await lib.ClosePrinter_Async(hwnd); return !!res; } //# sourceMappingURL=ClosePrinter.js.map