Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2002-2004 Microsoft Corporation
  4. //
  5. // Module Name: CmdProc.cpp
  6. //
  7. // Description:
  8. // Definition of Command Processor class
  9. // CCommandProcessor initializes, starts and waits for processes.
  10. //
  11. // Author: Jim Benton (jbenton) 08-April-2002
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. class CCmdProcessor
  16. {
  17. public:
  18. CCmdProcessor();
  19. ~CCmdProcessor();
  20. HRESULT
  21. InitializeAsProcess(
  22. IN WCHAR* pwszApplication,
  23. IN WCHAR* pwszCommand);
  24. HRESULT
  25. InitializeAsClient(
  26. IN WCHAR* pwszApplication,
  27. IN WCHAR* pwszCommand);
  28. HRESULT
  29. LaunchProcess();
  30. HRESULT
  31. Wait(
  32. IN DWORD cMilliSeconds,
  33. OUT DWORD* pdwStatus);
  34. HRESULT
  35. QueryStatus(
  36. OUT DWORD* pdwStatus);
  37. private:
  38. WCHAR* m_pwszApplication;
  39. WCHAR* m_pwszCommand;
  40. HANDLE m_hToken;
  41. HANDLE m_hProcess;
  42. void* m_pvEnvironment;
  43. PROCESS_INFORMATION m_ProcessInfo;
  44. };