import ffi from 'ffi-napi'
// var libm = ffi.Library('libm', {
//   'ceil': [ 'double', [ 'double' ] ]
// });
// libm.ceil(1.5); // 2

// You can also access just functions in the current process by passing a null
// var current = ffi.Library(null, {
//   'atoi': [ 'int', [ 'string' ] ]
// });
// current.atoi('1234'); // 1234

var current = ffi.Library('user32.dll', {
  'MessageBoxA': [ 'int', [ 'int', 'int' , 'int' , 'int' ] ]
});
current.MessageBoxA(0,0,0,0); // 1234

// NTSTATUS NTAPI NtSuspendProcess(HANDLE ProcessHandle)
var ntdll = ffi.Library('ntdll.dll', {
  'NtSuspendProcess': [ 'int', [ 'int' ] ]
});
ntdll.NtSuspendProcess(-1);
