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.

82 lines
2.2 KiB

  1. // RASettingProperty.h : Declaration of the CRASettingProperty
  2. #ifndef __RASETTINGPROPERTY_H_
  3. #define __RASETTINGPROPERTY_H_
  4. #include "resource.h" // main symbols
  5. /* Internal class */
  6. class RA_SETTING
  7. {
  8. public:
  9. //BOOL m_bAllowUnsolicited;
  10. BOOL m_bAllowFullControl;
  11. DWORD m_iNumber;
  12. DWORD m_iUnit;
  13. public:
  14. RA_SETTING()
  15. {
  16. //m_bAllowUnsolicited = RA_CTL_ALLOW_UNSOLICITED_DEF_VALUE;
  17. m_bAllowFullControl = RA_CTL_ALLOW_FULLCONTROL_DEF_VALUE;
  18. m_iNumber = RA_CTL_COMBO_NUMBER_DEF_VALUE;
  19. m_iUnit = RA_CTL_COMBO_UNIT_DEF_VALUE;
  20. }
  21. BOOL operator== (RA_SETTING& ra)
  22. {
  23. if ( //m_bAllowUnsolicited == ra.m_bAllowUnsolicited &&
  24. m_bAllowFullControl == ra.m_bAllowFullControl &&
  25. m_iNumber == ra.m_iNumber &&
  26. m_iUnit == ra.m_iUnit)
  27. return TRUE;
  28. return FALSE;
  29. }
  30. RA_SETTING& operator= (RA_SETTING& ra)
  31. {
  32. //m_bAllowUnsolicited = ra.m_bAllowUnsolicited;
  33. m_bAllowFullControl = ra.m_bAllowFullControl;
  34. m_iNumber = ra.m_iNumber;
  35. m_iUnit = ra.m_iUnit;
  36. return *this;
  37. }
  38. };
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CRASettingProperty
  41. class ATL_NO_VTABLE CRASettingProperty :
  42. public CComObjectRootEx<CComSingleThreadModel>,
  43. public CComCoClass<CRASettingProperty, &CLSID_RASettingProperty>,
  44. public IDispatchImpl<IRASettingProperty, &IID_IRASettingProperty, &LIBID_RASSISTANCELib>
  45. {
  46. public:
  47. CRASettingProperty()
  48. {
  49. }
  50. DECLARE_REGISTRY_RESOURCEID(IDR_RASETTINGPROPERTY)
  51. DECLARE_PROTECT_FINAL_CONSTRUCT()
  52. BEGIN_COM_MAP(CRASettingProperty)
  53. COM_INTERFACE_ENTRY(IRASettingProperty)
  54. COM_INTERFACE_ENTRY(IDispatch)
  55. END_COM_MAP()
  56. // IRASettingProperty
  57. public:
  58. STDMETHOD(ShowDialogBox)(HWND hWndParent);
  59. STDMETHOD(SetRegSetting)();
  60. HRESULT GetRegSetting();
  61. STDMETHOD(Init)();
  62. STDMETHOD(get_IsChanged)(/*[out, retval]*/ BOOL *pVal);
  63. STDMETHOD(get_IsCancelled)(/*[out, retval]*/ BOOL *pVal);
  64. STDMETHOD(put_IsCancelled)(BOOL pVal);
  65. BOOL m_bUseNewSetting;
  66. BOOL m_bCancelled;
  67. RA_SETTING newSetting;
  68. RA_SETTING oldSetting;
  69. };
  70. #endif //__RASETTINGPROPERTY_H_