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.

54 lines
1.6 KiB

  1. // MainPage.h : Declaration of the CMainPage
  2. #ifndef __MAINPAGE_H_
  3. #define __MAINPAGE_H_
  4. #include "Nusrmgr.h"
  5. #include "HTMLImpl.h"
  6. #include "resource.h" // main symbols
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CMainPage
  9. class ATL_NO_VTABLE DECLSPEC_UUID("C9332CBE-E2D6-4722-B81D-283E2A400E84") CMainPage :
  10. public CComObjectRoot,
  11. public CHTMLPageImpl<CMainPage,IMainPageUI>
  12. {
  13. public:
  14. DECLARE_NOT_AGGREGATABLE(CMainPage)
  15. //DECLARE_PROTECT_FINAL_CONSTRUCT()
  16. BEGIN_COM_MAP(CMainPage)
  17. COM_INTERFACE_ENTRY(ITaskPage)
  18. COM_INTERFACE_ENTRY(IMainPageUI)
  19. COM_INTERFACE_ENTRY2(IDispatch, IMainPageUI)
  20. END_COM_MAP()
  21. // IMainPageUI
  22. public:
  23. STDMETHOD(createUserTable)(/*[in]*/ IDispatch* pdispParent);
  24. public:
  25. static LPWSTR c_aHTML[2];
  26. };
  27. EXTERN_C const CLSID CLSID_MainPage;
  28. LPWSTR FormatString(LPCWSTR pszFormat, ...);
  29. BOOL IsAccountType(ILogonUser* pUser, UINT iType);
  30. UINT GetAccountType(ILogonUser* pUser);
  31. BOOL IsSameAccount(ILogonUser* pUser, LPCWSTR pszLoginName);
  32. BSTR GetUserDisplayName(ILogonUser* pUser);
  33. LPWSTR CreateUserDisplayHTML(LPCWSTR pszName, LPCWSTR pszSubtitle, LPCWSTR pszPicture);
  34. LPWSTR CreateUserDisplayHTML(ILogonUser* pUser);
  35. LPWSTR CreateDisabledGuestHTML();
  36. HRESULT CreateUserTableHTML(ILogonEnumUsers* pUserList, UINT cColumns, BSTR* pstrHTML);
  37. __inline BOOL IsOwnerAccount(ILogonUser* pUser) { return IsAccountType(pUser, 0); }
  38. __inline BOOL IsAdminAccount(ILogonUser* pUser) { return IsSameAccount(pUser, g_szAdminName); }
  39. __inline BOOL IsGuestAccount(ILogonUser* pUser) { return IsSameAccount(pUser, g_szGuestName); }
  40. #endif //__MAINPAGE_H_