UNPKG

win32-api

Version:

FFI definitions of windows win32 api for node-ffi

20 lines 683 B
import assert from 'node:assert'; import { getPRINTER_INFO_X_Ptr } from 'win32-def/struct'; export const funcName = 'GetPrinterW'; export const GetPrinterW_mapper = (name, runtimeArgs, defParamsArray) => { if (name !== funcName) { return; } const argLevel = runtimeArgs[1]; const argPtr = getPRINTER_INFO_X_Ptr(argLevel); assert(argPtr, `getPRINTER_INFO_X_Ptr(${argLevel}) failed`); for (const row of defParamsArray) { assert(Array.isArray(row)); const defPtr = row[2]; if (defPtr.endsWith(argPtr)) { return row; } } // return [] // will throw Error }; //# sourceMappingURL=GetPrinterW.mapper.js.map