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.

67 lines
1.6 KiB

  1. /*
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. setting.h
  5. Abstract:
  6. Definition of the CSetting class
  7. Revision History:
  8. created steveshi 08/23/00
  9. */
  10. #ifndef __SETTING_H_
  11. #define __SETTING_H_
  12. #include "resource.h" // main symbols
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CSetting
  15. class ATL_NO_VTABLE CSetting :
  16. public CComObjectRootEx<CComSingleThreadModel>,
  17. public CComCoClass<CSetting, &CLSID_RASetting>,
  18. public IDispatchImpl<IRASetting, &IID_IRASetting, &LIBID_SAFRCFILEDLGLib>
  19. {
  20. public:
  21. CSetting()
  22. {
  23. m_pIniFile = NULL;
  24. m_pProfileDir = NULL;
  25. }
  26. ~CSetting()
  27. {
  28. if (m_pIniFile) free(m_pIniFile);
  29. if (m_pProfileDir) free(m_pProfileDir);
  30. }
  31. DECLARE_REGISTRY_RESOURCEID(IDR_SETTING)
  32. DECLARE_PROTECT_FINAL_CONSTRUCT()
  33. BEGIN_COM_MAP(CSetting)
  34. COM_INTERFACE_ENTRY(IRASetting)
  35. COM_INTERFACE_ENTRY(IDispatch)
  36. END_COM_MAP()
  37. // Ismapi
  38. public:
  39. STDMETHOD(GetProfileString)(/*[in]*/ BSTR session, /*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(SetProfileString)(/*[in]*/ BSTR session, /*[in]*/ BSTR newVal);
  41. STDMETHOD(get_GetUserTempFileName)(/*[out, retval]*/ BSTR *pVal);
  42. STDMETHOD(get_GetPropertyInBlob)(/*[in]*/ BSTR bstrBlob, /*[in]*/ BSTR bstrName, /*[out, retval]*/ BSTR *pVal);
  43. STDMETHOD(AddPropertyToBlob)(BSTR Name, BSTR Value, BSTR oldBlob, BSTR *pnewBlob);
  44. STDMETHOD(get_GetUserProfileDirectory)(/*[out, retval]*/ BSTR *pVal);
  45. public:
  46. TCHAR* m_pIniFile;
  47. TCHAR* m_pProfileDir;
  48. protected:
  49. HRESULT InitProfile();
  50. };
  51. #endif //__SETTING_H_