Source code of Windows XP (NT5)
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.

70 lines
1.5 KiB

  1. // DvdCheck.h : Determine if DVD exists on a system. Differentiate between MCI and DirectShow Solutions
  2. //
  3. // Last Modified 3/31/99 by Steve Rowe (strowe)
  4. //
  5. #include <windows.h>
  6. // #include <ostream.h>
  7. //
  8. // DVD detection specific code
  9. //
  10. enum DecoderVendor
  11. {
  12. vendor_Unknown,
  13. vendor_MediaMatics,
  14. vendor_CyberLink,
  15. vendor_MGI,
  16. vendor_Ravisent,
  17. vendor_NEC,
  18. vendor_Intervideo,
  19. };
  20. class DVDResult
  21. {
  22. public:
  23. DVDResult();
  24. ~DVDResult();
  25. void SetFound( bool state );
  26. void SetVersion( const UINT64 Version );
  27. void SetCompanyName( const TCHAR* pCompanyName );
  28. void SetName( const TCHAR* pName );
  29. void SetCRC( DWORD crc32 );
  30. bool Found() const { return m_fFound; }
  31. UINT64 GetVersion() const { return m_Version; }
  32. DWORD GetCRC() const { return m_dwCRC; }
  33. const TCHAR* GetName() const { return m_pName; }
  34. const TCHAR* GetCompanyName() const { return m_pCompanyName; }
  35. DecoderVendor GetVendor() const;
  36. bool ShouldUpgrade( bool fWillBe9xUpgrade = false ) const;
  37. protected:
  38. bool m_fFound;
  39. DWORD m_dwCRC;
  40. UINT64 m_Version;
  41. TCHAR* m_pName;
  42. TCHAR* m_pCompanyName;
  43. DecoderVendor m_Vendor;
  44. };
  45. /*
  46. Usage for DetectDVD is as follows:
  47. DetectDVD will be E_UNEXPECTED if something goes wrong.
  48. */
  49. struct DVDDetectBuffer
  50. {
  51. DVDResult mci, sw, hw;
  52. DVDResult* Detect();
  53. HRESULT DetectAll();
  54. };
  55. namespace DVDDetectSetupRun
  56. {
  57. bool Add();
  58. bool Remove();
  59. };