DiscRecorder.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __DISC_RECORDER_20151220__
  2. #define __DISC_RECORDER_20151220__
  3. ///////////////////////////////////////////////////////////////////////
  4. // DiscRecorder.h
  5. //
  6. // Wrapper for IDiscRecorder2 Interface
  7. //
  8. // 包装IDiscRecorder2接口代表每个物理驱动器。 使用这个接口来检索信息包括制造商信息,逻辑驱动器,并支持媒体。
  9. //
  10. #pragma once
  11. class CDiscRecorder
  12. {
  13. private:
  14. IDiscRecorder2* m_discRecorder;
  15. SAFEARRAY* m_volumePathNames;
  16. HRESULT m_hResult;
  17. CString m_recorderUniqueId;
  18. public:
  19. CDiscRecorder(void);
  20. ~CDiscRecorder(void);
  21. inline HRESULT GetHresult() {return m_hResult;}
  22. inline IDiscRecorder2* GetInterface() {return m_discRecorder;}
  23. inline CString GetUniqueId() {return m_recorderUniqueId;}
  24. bool Initialize(const CString& recorderUniqueId);
  25. bool AcquireExclusiveAccess(bool force, const CString& clientName);
  26. bool ReleaseExclusiveAccess();
  27. CString ExclusiveAccessOwner();
  28. bool EjectMedia();
  29. bool CloseTray();
  30. bool EnableMcn();
  31. bool DisableMcn();
  32. LONG GetLegacyDeviceNumber();
  33. CString GetProductID();
  34. CString GetProductRevision();
  35. CString GetVendorId();
  36. CString GetVolumeName();
  37. ULONG GetTotalVolumePaths();
  38. CString GetVolumePath(ULONG volumePathIndex);
  39. };
  40. #endif