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.

53 lines
1.8 KiB

  1. #if !defined( _CERT_INCLUDED )
  2. #define _CERT_INCLUDED
  3. class CCertMapperMethod
  4. {
  5. #define IISMAPPER_LOCATE_BY_CERT 1
  6. #define IISMAPPER_LOCATE_BY_NAME 2
  7. #define IISMAPPER_LOCATE_BY_ACCT 3
  8. #define IISMAPPER_LOCATE_BY_INDEX 4
  9. private:
  10. IMSAdminBase* m_pIABase; //interface pointer
  11. METADATA_HANDLE m_hmd;
  12. LPWSTR m_pszMetabasePath;
  13. HRESULT Init(LPCWSTR);
  14. HRESULT Locate(LONG, VARIANT, LPWSTR);
  15. HRESULT SetString(LONG, VARIANT, BSTR, DWORD);
  16. HRESULT SetBSTR(BSTR*, DWORD, LPBYTE);
  17. HRESULT SetVariantAsByteArray(VARIANT*, DWORD, LPBYTE);
  18. HRESULT SetVariantAsBSTR(VARIANT*, DWORD, LPBYTE);
  19. HRESULT SetVariantAsLong(VARIANT*, DWORD);
  20. HRESULT GetStringFromBSTR(BSTR, LPSTR*, LPDWORD, BOOL fAddDelimInCount = true);
  21. HRESULT GetStringFromVariant(VARIANT*, LPSTR*, LPDWORD, BOOL fAddDelimInCount = true);
  22. HRESULT OpenMd(LPWSTR, DWORD dwPermission = METADATA_PERMISSION_READ);
  23. HRESULT CloseMd(BOOL fSave = FALSE);
  24. HRESULT DeleteMdObject(LPWSTR);
  25. HRESULT CreateMdObject(LPWSTR);
  26. HRESULT OpenAdminBaseKey(LPWSTR, DWORD);
  27. void CloseAdminBaseKey();
  28. void FreeString(LPSTR psz);
  29. public:
  30. CCertMapperMethod(LPCWSTR);
  31. ~CCertMapperMethod();
  32. HRESULT CreateMapping(VARIANT, BSTR, BSTR, BSTR, LONG);
  33. HRESULT GetMapping(LONG, VARIANT, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT*);
  34. HRESULT DeleteMapping(LONG, VARIANT);
  35. HRESULT SetEnabled(LONG, VARIANT, LONG);
  36. HRESULT SetName(LONG, VARIANT, BSTR);
  37. HRESULT SetPwd(LONG, VARIANT, BSTR);
  38. HRESULT SetAcct(LONG, VARIANT, BSTR);
  39. HRESULT SetMdData(LPWSTR, DWORD, DWORD, DWORD, LPBYTE);
  40. HRESULT GetMdData(LPWSTR, DWORD, DWORD, LPDWORD, LPBYTE*);
  41. };
  42. #endif