win32-api
Version:
FFI definitions of windows win32 api for node-ffi
49 lines • 2.29 kB
JavaScript
export class Kernel32 {
/**
* https://learn.microsoft.com/zh-cn/windows/win32/api/winbase/nf-winbase-formatmessage?redirectedfrom=MSDN
* dwLanguageId: https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693(v=vs.85).aspx
*/
FormatMessageW;
FreeConsole;
GenerateConsoleCtrlEvent;
GetLastError;
GetModuleHandleW;
GetModuleHandleExW;
GetProcessHeaps;
/** https://learn.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getsystemtimes */
GetSystemTimes;
/** https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount */
GetTickCount;
HeapFree;
OpenProcess;
/** https://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress */
GetProcAddress;
/** https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw */
LoadLibraryExW;
/** https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-outputdebugstringw */
OutputDebugStringW;
/** https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx */
SetLastError;
/**
* Enables an application to inform the system that it is in use,
* thereby preventing the system from entering sleep or turning off
* the display while the application is running.
*
* @example
* // Television recording is beginning. Enable away mode and prevent the sleep idle time-out.
* SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED);
*
* // Clear EXECUTION_STATE flags to disable away mode and allow the system to idle to sleep normally.
* SetThreadExecutionState(ES_CONTINUOUS);
*
* @param esFlags The thread's execution requirements.
* This parameter can be one or more of the following values. Join them with single |
* @returns If the function succeeds, the return value is the previous thread execution state.
* If the function fails, the return value is NULL.
* @see [Docs](https://learn.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-setthreadexecutionstate)
*
*/
SetThreadExecutionState;
}
/* c8 ignore stop */
//# sourceMappingURL=api.types.js.map