Process.h 503 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "utils/Expected.h"
  3. #include <stdint.h>
  4. #include <string>
  5. namespace il2cpp
  6. {
  7. namespace os
  8. {
  9. struct ProcessHandle;
  10. class Process
  11. {
  12. public:
  13. static int GetCurrentProcessId();
  14. static utils::Expected<ProcessHandle*> GetProcess(int processId);
  15. static void FreeProcess(ProcessHandle* handle);
  16. static utils::Expected<std::string> GetProcessName(ProcessHandle* handle);
  17. static intptr_t GetMainWindowHandle(int32_t pid);
  18. };
  19. }
  20. }