ifc_deviceobject.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER
  2. #define _NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/platform/guid.h>
  7. // {90A1273D-3E52-415f-ADC1-F151E6240C5B}
  8. static const GUID IFC_DeviceObject =
  9. { 0x90a1273d, 0x3e52, 0x415f, { 0xad, 0xc1, 0xf1, 0x51, 0xe6, 0x24, 0xc, 0x5b } };
  10. #include <bfc/dispatch.h>
  11. // supports AddRef(), Release(), QueryInterface()
  12. class __declspec(novtable) ifc_deviceobject : public Dispatchable
  13. {
  14. protected:
  15. ifc_deviceobject() {}
  16. ~ifc_deviceobject() {}
  17. public:
  18. const char *GetName();
  19. HRESULT GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height);
  20. HRESULT GetDisplayName(wchar_t *buffer, size_t bufferSize);
  21. public:
  22. DISPATCH_CODES
  23. {
  24. API_GETNAME = -10,
  25. API_GETICON = -11,
  26. API_GETDISPLAYNAME = -12,
  27. };
  28. };
  29. inline const char *ifc_deviceobject::GetName()
  30. {
  31. return _call(API_GETNAME, (const char *)NULL);
  32. }
  33. inline HRESULT ifc_deviceobject::GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height)
  34. {
  35. return _call(API_GETICON, (HRESULT)E_NOTIMPL, buffer, bufferSize, width, height);
  36. }
  37. inline HRESULT ifc_deviceobject::GetDisplayName(wchar_t *buffer, size_t bufferSize)
  38. {
  39. return _call(API_GETDISPLAYNAME, (HRESULT)E_NOTIMPL, buffer, bufferSize);
  40. }
  41. #endif //_NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER