Leaked source code of windows server 2003
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.

79 lines
1.4 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1999
  3. Module Name:
  4. cimppwr.hxx
  5. Abstract:
  6. Contains the definition of the ISensOnNow interface.
  7. Author:
  8. Gopal Parupudi <GopalP>
  9. [Notes:]
  10. optional-notes
  11. Revision History:
  12. GopalP 11/17/1997 Start.
  13. --*/
  14. #ifndef __CIMPPWR_HXX__
  15. #define __CIMPPWR_HXX__
  16. #include "sensevts.h"
  17. typedef void (FAR PASCAL *LPFNDESTROYED)(void);
  18. class CImpISensOnNow : public ISensOnNow
  19. {
  20. public:
  21. CImpISensOnNow(void);
  22. CImpISensOnNow(LPFNDESTROYED);
  23. ~CImpISensOnNow(void);
  24. //
  25. // IUnknown
  26. //
  27. STDMETHOD (QueryInterface) (REFIID, LPVOID *);
  28. STDMETHOD_(ULONG, AddRef) (void);
  29. STDMETHOD_(ULONG, Release) (void);
  30. //
  31. // IDispatch
  32. //
  33. STDMETHOD (GetTypeInfoCount) (UINT *);
  34. STDMETHOD (GetTypeInfo) (UINT, LCID, ITypeInfo **);
  35. STDMETHOD (GetIDsOfNames) (REFIID, LPOLESTR *, UINT, LCID, DISPID *);
  36. STDMETHOD (Invoke) (DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *);
  37. //
  38. // ISensOnNow
  39. //
  40. STDMETHOD (OnACPower) (void);
  41. STDMETHOD (OnBatteryPower) (DWORD);
  42. STDMETHOD (BatteryLow) (DWORD);
  43. private:
  44. ULONG m_cRef;
  45. LPFNDESTROYED m_pfnDestroy;
  46. };
  47. typedef CImpISensOnNow FAR * LPCIMPISENSONNOW;
  48. #endif // __CIMPPWR_HXX__