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.

61 lines
2.8 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: LogonIPC.h
  3. //
  4. // Copyright (c) 1999-2000, Microsoft Corporation
  5. //
  6. // Class that implements communication between an external process and the
  7. // GINA logon dialog.
  8. //
  9. // History: 1999-08-20 vtan created
  10. // 2000-01-31 vtan moved from Neptune to Whistler
  11. // --------------------------------------------------------------------------
  12. #ifndef _LogonIPC_
  13. #define _LogonIPC_
  14. // --------------------------------------------------------------------------
  15. // CLogonIPC
  16. //
  17. // Purpose: This class handles sending messages to the GINA logon dialog
  18. // which provides logon services for an external process hosting
  19. // the UI for the logon. All string are unicode strings.
  20. //
  21. // History: 1999-08-20 vtan created
  22. // 2000-01-31 vtan moved from Neptune to Whistler
  23. // 2000-03-09 vtan added UI host failure
  24. // --------------------------------------------------------------------------
  25. class CLogonIPC
  26. {
  27. private:
  28. CLogonIPC (const CLogonIPC& copyObject);
  29. bool operator == (const CLogonIPC& compareObject) const;
  30. const CLogonIPC& operator = (const CLogonIPC& assignObject);
  31. public:
  32. CLogonIPC (void);
  33. ~CLogonIPC (void);
  34. bool IsLogonServiceAvailable (void);
  35. bool IsUserLoggedOn (const WCHAR *pwszUsername, const WCHAR *pwszDomain);
  36. bool LogUserOn (const WCHAR *pwszUsername, const WCHAR *pwszDomain, WCHAR *pwszPassword);
  37. bool LogUserOff (const WCHAR *pwszUsername, const WCHAR *pwszDomain);
  38. bool TestBlankPassword (const WCHAR *pwszUsername, const WCHAR *pwszDomain);
  39. bool TestInteractiveLogonAllowed (const WCHAR *pwszUsername, const WCHAR *pwszDomain);
  40. bool TestEjectAllowed (void);
  41. bool TestShutdownAllowed (void);
  42. bool TurnOffComputer (void);
  43. bool EjectComputer (void);
  44. bool SignalUIHostFailure (void);
  45. bool AllowExternalCredentials (void);
  46. bool RequestExternalCredentials (void);
  47. private:
  48. void PackageIdentification (const WCHAR *pwszUsername, const WCHAR *pwszDomain, void *pIdentification);
  49. bool SendToLogonService (WORD wQueryType, void *pData, WORD wDataSize, bool fBlock);
  50. void PostToLogonService (WORD wQueryType, void *pData, WORD wDataSize);
  51. private:
  52. int _iLogonAttemptCount;
  53. HWND _hwndLogonService;
  54. };
  55. #endif /* _LogonIPC_ */