Source code of Windows XP (NT5)
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.

65 lines
2.6 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: UIHost.h
  3. //
  4. // Copyright (c) 1999-2000, Microsoft Corporation
  5. //
  6. // Class to handle the UI host for the logon process. This handles the IPC
  7. // as well as the creation and monitoring of process death. The process is
  8. // a restricted SYSTEM context process.
  9. //
  10. // History: 1999-09-14 vtan created
  11. // 2000-02-01 vtan moved from Neptune to Whistler
  12. // --------------------------------------------------------------------------
  13. #ifndef _UIHost_
  14. #define _UIHost_
  15. #include "DynamicArray.h"
  16. #include "ExternalProcess.h"
  17. // --------------------------------------------------------------------------
  18. // CUIHost
  19. //
  20. // Purpose: This class handles the starting and monitoring the termination
  21. // of the UI host process. It actually can implement the host in
  22. // whatever way it chooses.
  23. //
  24. // History: 1999-09-14 vtan created
  25. // 2000-02-01 vtan moved from Neptune to Whistler
  26. // --------------------------------------------------------------------------
  27. class CUIHost : public CExternalProcess
  28. {
  29. private:
  30. CUIHost (void);
  31. CUIHost (const CUIHost& copyObject);
  32. const CUIHost& operator = (const CUIHost& assignObject);
  33. public:
  34. CUIHost (const TCHAR *pszCommandLine);
  35. ~CUIHost (void);
  36. bool WaitRequired (void) const;
  37. NTSTATUS GetData (const void *pUIHostProcessAddress, void *pLogonProcessAddress, int iDataSize) const;
  38. NTSTATUS PutData (void *pUIHostProcessAddress, const void *pLogonProcessAddress, int iDataSize) const;
  39. NTSTATUS Show (void);
  40. NTSTATUS Hide (void);
  41. bool IsHidden (void) const;
  42. void* GetDataAddress (void) const;
  43. NTSTATUS PutData (const void *pvData, DWORD dwDataSize);
  44. NTSTATUS PutString (const WCHAR *pszString);
  45. protected:
  46. virtual void NotifyNoProcess (void);
  47. private:
  48. void ExpandCommandLine (const TCHAR *pszCommandLine);
  49. static BOOL CALLBACK EnumWindowsProc (HWND hwnd, LPARAM lParam);
  50. private:
  51. CDynamicArray _hwndArray;
  52. void *_pBufferAddress;
  53. };
  54. #endif /* _UIHost_ */