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.

48 lines
1.4 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 2000
  4. *
  5. * TITLE: WiaEvent.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * DATE: 2000/11/14
  10. *
  11. * DESCRIPTION: Implements callback for receiving WIA events.
  12. *
  13. *****************************************************************************/
  14. #ifndef _WIAEVENT_H_
  15. #define _WIAEVENT_H_
  16. class CWiaEvent : public IWiaEventCallback
  17. {
  18. public:
  19. CWiaEvent();
  20. ~CWiaEvent();
  21. // IUnknown
  22. STDMETHODIMP QueryInterface( REFIID riid, LPVOID *ppvObject );
  23. STDMETHODIMP_(ULONG) AddRef(void);
  24. STDMETHODIMP_(ULONG) Release(void);
  25. //IWiaEventCallback
  26. STDMETHODIMP ImageEventCallback(const GUID *pEventGUID,
  27. BSTR bstrEventDescription,
  28. BSTR bstrDeviceID,
  29. BSTR bstrDeviceDescription,
  30. DWORD dwDeviceType,
  31. BSTR bstrFullItemName,
  32. ULONG *pulEventType,
  33. ULONG ulReserved);
  34. static HRESULT RegisterForWiaEvent(LPCWSTR pwszDeviceId,
  35. const GUID &guidEvent,
  36. IUnknown **ppUnknown);
  37. private:
  38. LONG m_cRef;
  39. };
  40. #endif //_WIAEVENT_H_