home *** CD-ROM | disk | FTP | other *** search
- //+----------------------------------------------------------------------------
- //
- // File: app.h
- //
- // Copyight: (c) 1997, Microsoft Corporation
- // All Rights Reserved
- // Infomation Contained Herein Is Propprietary and Confidential
- //
- // Contents: simple app defines, prototypes & external data
- // declarations
- //
- //-----------------------------------------------------------------------------
-
- #ifndef CSYSINFO_H
- #define CSYSINFO_H
-
- // Global functions
- BOOL LoadBSTR(UINT, BSTR*, HINSTANCE);
-
- class CSysInfoSink : public IASEventSink, IASClassMsgSink
- {
- public:
- CSysInfoSink();
- ~CSysInfoSink() {}
-
-
- // IUnknown Members
- STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv); //Returns a point to requested interface
- STDMETHODIMP_(ULONG) AddRef(void); //Adds to the reference count
- STDMETHODIMP_(ULONG) Release(void); //Reduces reference count and deletes object if needed
-
- // IASEventSink
- STDMETHODIMP ReceiveMsg(long uMsg, long wParam, long lParam);
-
- // IASClassMsgSink
- STDMETHODIMP HandleClose(IDispatch *pdispControl)
- { return S_FALSE; }
- STDMETHODIMP HandleDraw(IDispatch *pdispControl, OLE_HANDLE hDC)
- { return S_FALSE; }
- STDMETHODIMP HandleGotFocus(IDispatch *pdispControl)
- { return S_FALSE; }
- STDMETHODIMP HandleLostFocus(IDispatch *pdispControl)
- { return S_FALSE; }
- STDMETHODIMP HandleStart(IDispatch *pdispControl)
- { return S_FALSE; }
- STDMETHODIMP HandleMessage(IDispatch *pdispControl, long uMsg, long wParam, long lParam)
- { return S_FALSE; }
- // HandleKeyPress is the only method we implement
- STDMETHODIMP HandleKeyPress(IDispatch *pdispControl, long lKeyDown);
-
- //IDispatch methods, a token implementation required for COM
- STDMETHODIMP GetTypeInfoCount(UINT *pctInfo)
- { return E_NOTIMPL; }
- STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo)
- { return E_NOTIMPL; }
- STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR **rgszNames, UINT cNames,
- LCID lcid, DISPID *rgdispids)
- { return E_NOTIMPL; }
- STDMETHODIMP Invoke(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams,
- VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr)
- { return E_NOTIMPL; }
-
-
- private:
- long m_cRef;
-
-
- };
-
- class CSysInfoApp
- {
- public:
- CSysInfoApp(HINSTANCE);
- ~CSysInfoApp();
-
-
- // Attributes
- public:
- BSTR m_bstrAppName; // Application caption title.
-
- public:
- IASEventSink* m_pAppEventSink; // the form and app's event sink
- IASClassMsgSink* m_pAppMessageSink;
- IfmManage* m_pManage; // the forms manager object
- IASForm* m_pForm;
- IASPowerListBox* m_pPLBInfo;
-
- HINSTANCE m_hInst;
-
- DWORD m_dwThreadId;
-
- // Operations
- public:
- BOOL Init();
-
- private:
- HRESULT CreateSink();
- HRESULT CreateForm();
- HRESULT CreateFormManager();
- HRESULT BuildMenu();
- };
-
- #endif //CSYSINFO_H
-
-