DiscMaster.h 629 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __DISC_MASTER_20151220__
  2. #define __DISC_MASTER_20151220__
  3. ///////////////////////////////////////////////////////////////////////
  4. // DiscMaster.h
  5. //
  6. // 封装IDiscMaster2接口;
  7. //
  8. // 枚举计算机上所有光学设备;用来判断计算机是否连接着CD或DVD驱动器;
  9. #pragma once
  10. class CDiscMaster
  11. {
  12. private:
  13. IDiscMaster2* m_discMaster;
  14. HRESULT m_hResult;
  15. CString m_errorMessage;
  16. public:
  17. CDiscMaster(void);
  18. ~CDiscMaster(void);
  19. inline HRESULT GetHresult() {return m_hResult;}
  20. inline CString GetErrorMessage() {return m_errorMessage;}
  21. bool Initialize();
  22. long GetTotalDevices();
  23. CString GetDeviceUniqueID(long index);
  24. };
  25. #endif