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.

87 lines
2.2 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: SAKeypadController.h
  4. //
  5. // Synopsis: This file holds the declarations of the
  6. // CSAKeypadController class
  7. //
  8. // History: 11/15/2000 serdarun Created
  9. //
  10. // Copyright (C) 1999-2000 Microsoft Corporation
  11. // All rights reserved.
  12. //
  13. //#--------------------------------------------------------------
  14. #ifndef __SAKEYPADCONTROLLER_H_
  15. #define __SAKEYPADCONTROLLER_H_
  16. #include "resource.h" // main symbols
  17. #include <atlctl.h>
  18. #define iNumberOfKeys 6
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CSAKeypadController
  21. //
  22. //
  23. //
  24. class ATL_NO_VTABLE CSAKeypadController :
  25. public CComObjectRootEx<CComSingleThreadModel>,
  26. public CComCoClass<CSAKeypadController, &CLSID_SAKeypadController>,
  27. public IDispatchImpl<ISAKeypadController, &IID_ISAKeypadController, &LIBID_LDMLib>,
  28. public IObjectSafetyImpl<CSAKeypadController,INTERFACESAFE_FOR_UNTRUSTED_CALLER>
  29. {
  30. public:
  31. CSAKeypadController()
  32. {
  33. }
  34. DECLARE_REGISTRY_RESOURCEID(IDR_SAKEYPADCONTROLLER)
  35. DECLARE_NOT_AGGREGATABLE(CSAKeypadController)
  36. DECLARE_PROTECT_FINAL_CONSTRUCT()
  37. DECLARE_CLASSFACTORY_SINGLETON (CSAKeypadController)
  38. BEGIN_COM_MAP(CSAKeypadController)
  39. COM_INTERFACE_ENTRY(ISAKeypadController)
  40. COM_INTERFACE_ENTRY(IDispatch)
  41. COM_INTERFACE_ENTRY(IObjectSafety)
  42. END_COM_MAP()
  43. private:
  44. LONG arlMessages[iNumberOfKeys];
  45. BOOL arbShiftKeys[iNumberOfKeys];
  46. public:
  47. //
  48. // IObjectSafety methods
  49. //
  50. STDMETHOD(SetInterfaceSafetyOptions)(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
  51. {
  52. return S_OK;
  53. }
  54. //
  55. // ISAKeypadController methods
  56. //
  57. STDMETHOD(GetKey)(
  58. /*[in]*/ LONG lKeyID,
  59. /*[out]*/ LONG * lMessage,
  60. /*[out]*/ BOOL * fShiftKeyDown
  61. );
  62. STDMETHOD(SetKey)(
  63. /*[in]*/ LONG lKeyID,
  64. /*[in]*/ LONG lMessage,
  65. /*[in]*/ BOOL fShiftKeyDown);
  66. STDMETHOD(LoadDefaults)();
  67. };
  68. #endif //__SAKEYPADCONTROLLER_H_