Skip to content

Instantly share code, notes, and snippets.

/* tslint:disable no-console */
import escapeRegExp from 'escape-string-regexp';
import { readFileSync } from 'fs';
import glob from 'glob';
import Mocha from 'mocha';
import path from 'path';
import { parse } from 'path';
import { CallExpression, createSourceFile, Identifier, Node, ScriptKind, ScriptTarget, StringLiteral, SyntaxKind } from 'typescript';
const testFile = process.env.RUN_FILE;
const ffi = require('ffi-napi');
const ref = require('ref-napi');
//const ffi = require('ffi');
//const ref = require('ref');
const Struct = require('ref-struct-di')(ref);
const { DTypes, DStruct } = require('win32-def');
const eventProcDelegate = ffi.Callback(DTypes.VOID, [DTypes.HANDLE, DTypes.DWORD, DTypes.HWND, DTypes.LONG, DTypes.LONG, DTypes.DWORD, DTypes.DWORD], eventProc);
global.keepAReference = eventProcDelegate;