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.

65 lines
1.4 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  3. //
  4. // ***************************************************************************
  5. //
  6. // Original Author: Rajesh Rao
  7. //
  8. // $Author: rajeshr $
  9. // $Date: 6/11/98 4:43p $
  10. // $Workfile:clasname.h $
  11. //
  12. // $Modtime: 6/11/98 11:21a $
  13. // $Revision: 1 $
  14. // $Nokeywords: $
  15. //
  16. //
  17. // Description: Contains the declaration for a list of class names. This user
  18. // the templates from SNMPProvider\Common
  19. //***************************************************************************
  20. /////////////////////////////////////////////////////////////////////////
  21. #ifndef NAME_LIST_H
  22. #define NAME_LIST_H
  23. // Need to encapsulate LPWSTR to avoid conversion to CString
  24. class CLPWSTR
  25. {
  26. public :
  27. LPWSTR pszVal;
  28. DWORD dwImpersonationLevel;
  29. CLPWSTR * pNext;
  30. CLPWSTR()
  31. {
  32. pszVal = NULL;
  33. pNext = NULL;
  34. }
  35. ~CLPWSTR()
  36. {
  37. delete [] pszVal;
  38. }
  39. };
  40. class CNamesList
  41. {
  42. private:
  43. CRITICAL_SECTION m_AccessibleClassesSection;
  44. CLPWSTR *m_pListOfClassNames;
  45. DWORD m_dwElementCount;
  46. HRESULT GetImpersonationLevel(DWORD *pdwImpLevel);
  47. public:
  48. CNamesList();
  49. virtual ~CNamesList();
  50. BOOLEAN IsNamePresent(LPCWSTR pszClassName);
  51. BOOLEAN RemoveName(LPCWSTR pszClassName);
  52. BOOLEAN AddName(LPCWSTR pszClassName);
  53. DWORD GetAllNames(LPWSTR **ppszNames);
  54. };
  55. #endif /*NAME_LIST_H*/