diff options
author | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-03-04 03:05:53 -0600 |
---|---|---|
committer | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-03-04 03:05:53 -0600 |
commit | a5c860b8ab24c198b7390fbde90044754e35c1c5 (patch) | |
tree | 3118b27b5c76cab44bb61d83df750a9f00b4be00 /internal/windows/const.go | |
parent | 5a3bf6315aab33e6488734a579977836042b4aa1 (diff) | |
parent | f98989334bbe227bbe9dc4c84a2d0e34aa2fb86f (diff) | |
download | goexec-a5c860b8ab24c198b7390fbde90044754e35c1c5.tar.gz goexec-a5c860b8ab24c198b7390fbde90044754e35c1c5.zip |
Simple fixes
Diffstat (limited to 'internal/windows/const.go')
-rw-r--r-- | internal/windows/const.go | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/windows/const.go b/internal/windows/const.go new file mode 100644 index 0000000..4c4fbe6 --- /dev/null +++ b/internal/windows/const.go @@ -0,0 +1,37 @@ +package windows + +const ( + // Windows error codes + ERROR_FILE_NOT_FOUND uint32 = 0x00000002 + ERROR_SERVICE_REQUEST_TIMEOUT uint32 = 0x0000041d + ERROR_SERVICE_DOES_NOT_EXIST uint32 = 0x00000424 + ERROR_SERVICE_NOT_ACTIVE uint32 = 0x00000426 + + // Windows service/scm constants + SERVICE_BOOT_START uint32 = 0x00000000 + SERVICE_SYSTEM_START uint32 = 0x00000001 + SERVICE_AUTO_START uint32 = 0x00000002 + SERVICE_DEMAND_START uint32 = 0x00000003 + SERVICE_DISABLED uint32 = 0x00000004 + + // https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/4e91ff36-ab5f-49ed-a43d-a308e72b0b3c + SERVICE_CONTINUE_PENDING uint32 = 0x00000005 + SERVICE_PAUSE_PENDING uint32 = 0x00000006 + SERVICE_PAUSED uint32 = 0x00000007 + SERVICE_RUNNING uint32 = 0x00000004 + SERVICE_START_PENDING uint32 = 0x00000002 + SERVICE_STOP_PENDING uint32 = 0x00000003 + SERVICE_STOPPED uint32 = 0x00000001 + + SERVICE_WIN32_OWN_PROCESS uint32 = 0x00000010 + + SERVICE_CONTROL_STOP uint32 = 0x00000001 + SC_MANAGER_CREATE_SERVICE uint32 = 0x00000002 + + // https://learn.microsoft.com/en-us/windows/win32/services/service-security-and-access-rights + SERVICE_QUERY_CONFIG uint32 = 0x00000001 + SERVICE_CHANGE_CONFIG uint32 = 0x00000002 + SERVICE_START uint32 = 0x00000010 + SERVICE_STOP uint32 = 0x00000020 + SERVICE_DELETE uint32 = 0x00010000 // special permission +) |