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.

35 lines
844 B

  1. #ifndef _MDKEY_H_
  2. #define _MDKEY_H_
  3. //class CMDKey : public CObject
  4. class CMDKey
  5. {
  6. protected:
  7. IMSAdminBase * m_pcCom;
  8. METADATA_HANDLE m_hKey;
  9. LPTSTR pszFailedAPI;
  10. public:
  11. CMDKey();
  12. ~CMDKey();
  13. // allow CMDKey to be used where type METADATA_HANDLE is required
  14. operator METADATA_HANDLE () {return m_hKey;}
  15. METADATA_HANDLE GetMDKeyHandle() {return m_hKey;}
  16. IMSAdminBase *GetMDKeyICOM() {return m_pcCom;}
  17. // open an existing MD key
  18. HRESULT OpenNode(LPCTSTR pchSubKeyPath);
  19. // close node opened/created by OpenNode() or CreateNode()
  20. HRESULT Close();
  21. // Delete a node
  22. HRESULT DeleteNode(LPCTSTR pchSubKeyPath);
  23. private:
  24. HRESULT DoCoInitEx();
  25. void DoCoUnInit();
  26. // a count of the calls to coinit
  27. INT m_cCoInits;
  28. };
  29. #endif // _MDKEY_H_