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.

60 lines
1.5 KiB

  1. // cdplay.h.h : Declaration of the CCDPlay
  2. #ifndef __CDPLAY_H_
  3. #define __CDPLAY_H_
  4. #include "playres.h"
  5. #include "..\main\mmfw.h"
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CCDPlay
  8. class CCDPlay : public IMMComponent, IMMComponentAutomation
  9. {
  10. public:
  11. CCDPlay();
  12. ~CCDPlay();
  13. // ICDPlay
  14. public:
  15. STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObj);
  16. STDMETHOD_(ULONG,AddRef)();
  17. STDMETHOD_(ULONG,Release)();
  18. STDMETHOD(GetInfo)(MMCOMPDATA* mmCompData);
  19. STDMETHOD(Init)(IMMFWNotifySink* pSink, HWND hwndMain, RECT* pRect, HWND* phwndComp, HMENU* phMenu);
  20. STDMETHOD(OnAction)(MMACTIONS mmActionID, LPVOID pAction);
  21. private:
  22. STDMETHOD(QueryVolumeSupport)(BOOL* pVolume, BOOL* pPan);
  23. void InitIcons();
  24. HRESULT GetTrackInfo(LPMMTRACKORDISC pInfo);
  25. HRESULT GetDiscInfo(LPMMTRACKORDISC pInfo);
  26. void NormalizeNameForMenuDisplay(TCHAR* szInput, TCHAR* szOutput, DWORD cbLen);
  27. void SetTrack(int nTrack);
  28. void SetDisc(int nDisc);
  29. IMMFWNotifySink* m_pSink;
  30. HICON m_hIcon16;
  31. HICON m_hIcon32;
  32. HMENU m_hMenu;
  33. HWND m_hwndMain;
  34. DWORD m_dwRef;
  35. };
  36. class CCDPlayClassFactory : public IClassFactory
  37. {
  38. public:
  39. CCDPlayClassFactory();
  40. STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObj);
  41. STDMETHOD_(ULONG,AddRef)();
  42. STDMETHOD_(ULONG,Release)();
  43. STDMETHOD(CreateInstance)(IUnknown * pUnkOuter, REFIID riid, void ** ppvObject);
  44. STDMETHOD(LockServer)(BOOL fLock);
  45. private:
  46. DWORD m_dwRef;
  47. };
  48. #endif //__CDPLAY_H_