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.

41 lines
1.2 KiB

  1. // eventcallback.h
  2. #ifndef _INC_EVENT_CALLBACK
  3. #define _INC_EVENT_CALLBACK
  4. #define ID_WIAEVENT_CONNECT 0
  5. #define ID_WIAEVENT_DISCONNECT 1
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CEventCallback
  8. class CEventCallback : public IWiaEventCallback
  9. {
  10. private:
  11. ULONG m_cRef; // Object reference count.
  12. int m_EventID; // What kind of event is this callback for?
  13. public:
  14. IUnknown *m_pIUnkRelease; // release server registration
  15. public:
  16. // Constructor, initialization and destructor methods.
  17. CEventCallback();
  18. ~CEventCallback();
  19. // IUnknown members that delegate to m_pUnkRef.
  20. HRESULT _stdcall QueryInterface(const IID&,void**);
  21. ULONG _stdcall AddRef();
  22. ULONG _stdcall Release();
  23. HRESULT _stdcall Initialize(int EventID);
  24. HRESULT _stdcall ImageEventCallback(
  25. const GUID *pEventGUID,
  26. BSTR bstrEventDescription,
  27. BSTR bstrDeviceID,
  28. BSTR bstrDeviceDescription,
  29. DWORD dwDeviceType,
  30. BSTR bstrFullItemName,
  31. ULONG *plEventType,
  32. ULONG ulReserved);
  33. };
  34. #endif