home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Win32_Samples / win32 / tuneit / tunesink.h < prev   
Encoding:
C/C++ Source or Header  |  1999-05-13  |  2.3 KB  |  70 lines

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2.  
  3. Copyright (c) 1998 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     tunesink.h
  8.  
  9. Abstract:
  10.  
  11.     Definition of TuneIt AutoPC Sample Application's Event Sink and 
  12.     Class Message Sink.
  13.  
  14. Environment:
  15.  
  16.     AutoPC
  17.  
  18. -------------------------------------------------------------------*/
  19.  
  20. #ifndef TUNESINK_H
  21. #define TUNESINK_H
  22.  
  23. class CAppEventSink : public IASEventSink, public IASClassMsgSink
  24. {
  25. public:
  26.     CAppEventSink() { m_cRef = 0; }
  27.     ~CAppEventSink() {}
  28.     
  29.     //IUnknown methods, required for COM objects
  30.     STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv);    //Returns a point to requested interface
  31.     STDMETHODIMP_(ULONG) AddRef(void);                        //Adds to the reference count
  32.     STDMETHODIMP_(ULONG) Release(void);                        //Reduces reference count and deletes object if needed
  33.  
  34.     //IDispatch methods, a token implementation required for COM
  35.     STDMETHODIMP GetTypeInfoCount(UINT *pctInfo) 
  36.     { return E_NOTIMPL; }                                                    
  37.     STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo) 
  38.     { return E_NOTIMPL; }                                                    
  39.     STDMETHODIMP GetIDsOfNames(REFIID riid,    OLECHAR **rgszNames, UINT cNames, 
  40.         LCID lcid, DISPID *rgdispids) 
  41.     { return E_NOTIMPL; }                                                    
  42.     STDMETHODIMP Invoke(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams,            
  43.         VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr) 
  44.     { return E_NOTIMPL; }                                                    
  45.  
  46.     //IASEventSink Interface invoked when an event is fired
  47.     STDMETHODIMP ReceiveMsg(long uMsg, long wParam, long lParam);
  48.  
  49.     //Class message sink methods
  50.     STDMETHODIMP HandleClose(IDispatch *pdispControl) 
  51.     { return S_FALSE; }
  52.     STDMETHODIMP HandleDraw(IDispatch *pdispControl, OLE_HANDLE hDC) 
  53.     { return S_FALSE; }
  54.     STDMETHODIMP HandleGotFocus(IDispatch *pdispControl) 
  55.     { return S_FALSE; }
  56.     STDMETHODIMP HandleKeyPress(IDispatch *pdispControl, long lKeyDown) 
  57.     { return S_FALSE; }
  58.     STDMETHODIMP HandleLostFocus(IDispatch *pdispControl) 
  59.     { return S_FALSE; }
  60.     // HandleMessage is the only method we implement
  61.     STDMETHODIMP HandleMessage(IDispatch *pdispControl, long uMsg, long wParam, long lParam);
  62.     STDMETHODIMP HandleStart(IDispatch *pdispControl) 
  63.     { return S_FALSE; }
  64.  
  65. private:
  66.     long m_cRef;    // Objects reference count
  67.  
  68. };
  69.  
  70. #endif // TUNESINK_H