import { DModel as M , DTypes as W , FModel as FM } from 'win32-def' ; export interface Win32Fns extends FM . DllFuncsModel { /**
     * https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx
     * dwLanguageId: https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693(v=vs.85).aspx
     */ FormatMessageW : ( dwFlags : M . DWORD , lpSource : M . LPCVOID | null , dwMessageId : M . DWORD , dwLanguageId : M . DWORD , lpBuffer : M . LPTSTR , nSize : M . DWORD , Arguments : M . va_list | null ) => M . DWORD ; FreeConsole : ( ) => M . BOOL ; GenerateConsoleCtrlEvent : ( dwCtrlEvent : M . DWORD , dwProcessGroupId : M . DWORD ) => M . BOOL ; see https GetLastError : ( ) => M . DWORD ; GetModuleHandleW : ( lpModuleName : M . LPCTSTR | null ) => M . HMODULE ; GetModuleHandleExW : ( dwFlags : M . DWORD , lpModuleName : M . LPCTSTR | null , phModule : M . HMODULE ) => M . BOOL ; GetProcessHeaps : ( NumberOfHeaps : M . DWORD , ProcessHeaps : M . PHANDLE ) => M . DWORD ; /** https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getsystemtimes */ GetSystemTimes : ( lpIdleTime : M . PFILETIME , lpKernelTime : M . PFILETIME , lpUserTime : M . PFILETIME ) => M . BOOL ; HeapFree : ( hHeap : M . HANDLE , dwFlags : M . DWORD , lpMem : M . LPVOID | null ) => M . BOOL ; OpenProcess : ( dwDesiredAccess : M . DWORD , bInheritHandle : M . BOOL , dwProcessId : M . DWORD ) => M . HANDLE ; /** https://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs.85).aspx */ OutputDebugStringW : ( lpOutputString : M . LPCTSTR ) => M . VOID ; /** https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx */ SetLastError : ( dwErrCode : M . DWORD ) => M . VOID ; example param esFlags returns see [Docs] https *
     * Note: The return value NULL would be converted to zero by node-ffi
      SetThreadExecutionState : ( esFlags : M . UINT ) => M . UINT ; } export const apiDef = { FormatMessageW : [ W . DWORD , [ W . DWORD , W . LPCVOID , W . DWORD , W . DWORD , W . LPTSTR , W . DWORD , W . va_list ] , ] , FreeConsole : [ W . BOOL , [ ] ] , GenerateConsoleCtrlEvent : [ W . BOOL , [ W . DWORD , W . DWORD ] ] , /** err code: https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms681381(v=vs.85).aspx */ GetLastError : [ W . DWORD , [ ] ] , /** retrive value from buf by ret.ref().readUInt32() */ GetModuleHandleW : [ W . HMODULE , [ W . LPCTSTR ] ] , /** flags, optional LPCTSTR name, ref hModule */ GetModuleHandleExW : [ W . BOOL , [ W . DWORD , W . LPCTSTR , W . HMODULE ] ] , GetProcessHeaps : [ W . DWORD , [ W . DWORD , W . PHANDLE ] ] , GetSystemTimes : [ W . BOOL , [ W . PFILETIME , W . PFILETIME , W . PFILETIME ] ] , HeapFree : [ W . BOOL , [ W . HANDLE , W . DWORD , W . LPVOID ] ] , OpenProcess : [ W . HANDLE , [ W . DWORD , W . BOOL , W . DWORD ] ] , OutputDebugStringW : [ W . VOID , [ W . LPCTSTR ] ] , SetLastError : [ W . VOID , [ W . DWORD ] ] , SetThreadExecutionState : [ W . INT , [ W . INT ] ] , } ;