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.

76 lines
1.9 KiB

  1. // wrapmaps.h --
  2. #ifndef _wrapmaps_h__31598_
  3. #define _wrapmaps_h__31598_
  4. // see iismap.hxx for the parental classes
  5. #include "strpass.h"
  6. //--------------------------------------------------------
  7. class C11Mapping
  8. {
  9. public:
  10. #define NEW_OBJECT 0xFFFFFFFF
  11. C11Mapping() :
  12. m_fEnabled(TRUE),
  13. m_pCert(NULL),
  14. m_cbCert(0),
  15. iMD(NEW_OBJECT)
  16. {;}
  17. ~C11Mapping()
  18. {
  19. if ( m_pCert )
  20. GlobalFree( m_pCert );
  21. }
  22. BOOL GetCertificate( PUCHAR* ppCert, DWORD* pcbCert );
  23. BOOL SetCertificate( PUCHAR pCert, DWORD cbCert );
  24. BOOL GetNTAccount( CString &szAccount );
  25. BOOL SetNTAccount( CString szAccount );
  26. BOOL GetNTPassword( CStrPassword &szAccount );
  27. BOOL SetNTPassword( CString szAccount );
  28. BOOL GetMapName( CString &szName );
  29. BOOL SetMapName( CString szName );
  30. BOOL SetNodeName( CString szNodeName );
  31. CString& QueryNodeName();
  32. CString& QueryCertHash();
  33. BOOL GetMapEnabled( BOOL* pfEnabled );
  34. BOOL SetMapEnabled( BOOL fEnabled );
  35. // BOOL GetMapIndex( DWORD* pIndex );
  36. // BOOL SetMapIndex( DWORD index );
  37. // name of this mapping's name in the metabase. If it is not in the metabase
  38. // (its new), then value is NEW_OBJECT
  39. // iMD is used only when accessing IIS5, IIS5.1
  40. DWORD iMD;
  41. // name of the node in the metabase
  42. // (typically the certificate hash)
  43. // storing this mapping (m_szName is not enforced to be unique)
  44. // m_szModeName is used only when accessing IIS6 or higher
  45. CString m_szNodeName;
  46. protected:
  47. #define BUFF_SIZE MAX_PATH
  48. CString m_szAccount;
  49. CStrPassword m_szPassword;
  50. CString m_szName;
  51. BOOL m_fEnabled;
  52. PVOID m_pCert;
  53. DWORD m_cbCert;
  54. CString m_szCertHash;
  55. };
  56. #endif /* _wrapmaps_h__31598_ */