abi.ts 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /** Generic Win32 process, stdio, and Job Object constants verified on x64. */
  2. /** STARTUPINFOW uses the standard input, output, and error handles. */
  3. export const STARTF_USESTDHANDLES = 0x00000100
  4. /** STARTUPINFOW applies wShowWindow when creating a console window. */
  5. export const STARTF_USESHOWWINDOW = 0x00000001
  6. /** Initial window visibility that preserves the child's console attachment. */
  7. export const SW_HIDE = 0
  8. /** HandleInformation flag that permits child inheritance. */
  9. export const HANDLE_FLAG_INHERIT = 0x1
  10. /** Infinite WaitForSingleObject timeout. */
  11. export const INFINITE = 0xFFFFFFFF
  12. /** WaitForSingleObject returned because a zero-time probe is not signalled. */
  13. export const WAIT_TIMEOUT = 258
  14. /** CreateProcess flag that prevents user code from running before resume. */
  15. export const CREATE_SUSPENDED = 0x4
  16. /** CreateProcess flag selecting a UTF-16 environment block. */
  17. export const CREATE_UNICODE_ENVIRONMENT = 0x400
  18. /** GetStdHandle selector for standard input. */
  19. export const STD_INPUT_HANDLE = -10
  20. /** GetStdHandle selector for standard output. */
  21. export const STD_OUTPUT_HANDLE = -11
  22. /** GetStdHandle selector for standard error. */
  23. export const STD_ERROR_HANDLE = -12
  24. /** FormatMessage reads the operating system message table. */
  25. export const FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
  26. /** FormatMessage leaves insertion placeholders uninterpreted. */
  27. export const FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200
  28. /** Win32 code reporting a caller-provided buffer is too small. */
  29. export const ERROR_INSUFFICIENT_BUFFER = 122
  30. /** Win32 code reporting that the other pipe end closed. */
  31. export const ERROR_BROKEN_PIPE = 109
  32. /** Win32 code reporting that a pipe has no remaining data. */
  33. export const ERROR_NO_DATA = 232
  34. /** Job limit that terminates every member when the final Job handle closes. */
  35. export const JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000
  36. /** QueryInformationJobObject class for basic accounting and active-process count. */
  37. export const JobObjectBasicAccountingInformation = 1
  38. /** SetInformationJobObject class for JOBOBJECT_EXTENDED_LIMIT_INFORMATION. */
  39. export const JobObjectExtendedLimitInformation = 9
  40. /** x64 JOBOBJECT_BASIC_ACCOUNTING_INFORMATION byte size. */
  41. export const JOBOBJECT_BASIC_ACCOUNTING_SIZE = 48
  42. /** Byte offset of ActiveProcesses in JOBOBJECT_BASIC_ACCOUNTING_INFORMATION. */
  43. export const JOBOBJECT_BASIC_ACCOUNTING_ACTIVE_PROCESSES_OFFSET = 40
  44. /** x64 JOBOBJECT_EXTENDED_LIMIT_INFORMATION byte size. */
  45. export const JOBOBJECT_EXTENDED_LIMIT_SIZE = 144
  46. /** Byte offset of BasicLimitInformation.LimitFlags in the extended Job record. */
  47. export const JOBOBJECT_EXTENDED_LIMIT_FLAGS_OFFSET = 16
  48. /** x64 STARTUPINFOW byte size verified by the native probe. */
  49. export const STARTUPINFOW_SIZE = 104
  50. /** x64 PROCESS_INFORMATION byte size verified by the native probe. */
  51. export const PROCESS_INFORMATION_SIZE = 24