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.

69 lines
3.6 KiB

  1. // AttrStrW.h : Declaration of the CMLStrAttrWStr
  2. #ifndef __ATTRSTRW_H_
  3. #define __ATTRSTRW_H_
  4. #include "mlatl.h"
  5. #include "attrstr.h"
  6. #include "mlstrbuf.h"
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CMLStrAttrWStr
  9. class ATL_NO_VTABLE CMLStrAttrWStr :
  10. public CMLStrAttrStrCommon,
  11. public CComObjectRoot,
  12. public CComCoClass<CMLStrAttrWStr, &CLSID_CMLStrAttrWStr>,
  13. public IMLStrAttrWStr,
  14. public IMLangStringNotifySink,
  15. public IConnectionPointContainerImpl<CMLStrAttrWStr>,
  16. public IConnectionPointImpl<CMLStrAttrWStr, &IID_IMLStrAttrNotifySink>
  17. {
  18. typedef CMLStrAttrWStr* POWNER;
  19. public:
  20. CMLStrAttrWStr(void);
  21. DECLARE_NO_REGISTRY()
  22. BEGIN_COM_MAP(CMLStrAttrWStr)
  23. COM_INTERFACE_ENTRY(IMLStrAttr)
  24. COM_INTERFACE_ENTRY(IMLStrAttrWStr)
  25. COM_INTERFACE_ENTRY(IMLangStringNotifySink)
  26. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  27. END_COM_MAP()
  28. BEGIN_CONNECTION_POINT_MAP(CMLStrAttrWStr)
  29. CONNECTION_POINT_ENTRY(IID_IMLStrAttrNotifySink)
  30. END_CONNECTION_POINT_MAP()
  31. public:
  32. // IMLStrAttr
  33. STDMETHOD(SetClient)(/*[in]*/ IUnknown* pUnk);
  34. STDMETHOD(GetClient)(/*[out]*/ IUnknown** ppUnk);
  35. STDMETHOD(QueryAttr)(/*[in]*/ REFIID riid, /*[in]*/ LPARAM lParam, /*[out]*/ IUnknown** ppUnk, /*[out]*/ long* lConf);
  36. STDMETHOD(GetAttrInterface)(/*[out]*/ IID* pIID, /*[out]*/ LPARAM* plParam);
  37. STDMETHOD(SetMLStr)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in]*/ IUnknown* pSrcMLStr, /*[in]*/ long lSrcPos, /*[in]*/ long lSrcLen);
  38. // IMLStrAttrWStr
  39. STDMETHOD(SetWStr)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in, size_is(cchSrc)]*/ const WCHAR* pszSrc, /*[in]*/ long cchSrc, /*[out]*/ long* pcchActual, /*[out]*/ long* plActualLen);
  40. STDMETHOD(SetStrBufW)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in]*/ IMLangStringBufW* pSrcBuf, /*[out]*/ long* pcchActual, /*[out]*/ long* plActualLen);
  41. STDMETHOD(GetWStr)(/*[in]*/ long lSrcPos, /*[in]*/ long lSrcLen, /*[out, size_is(cchDest)]*/ WCHAR* pszDest, /*[in]*/ long cchDest, /*[out]*/ long* pcchActual, /*[out]*/ long* plActualLen);
  42. STDMETHOD(GetStrBufW)(/*[in]*/ long lSrcPos, /*[in]*/ long lSrcMaxLen, /*[out]*/ IMLangStringBufW** ppDestBuf, /*[out]*/ long* plDestLen);
  43. STDMETHOD(LockWStr)(/*[in]*/ long lSrcPos, /*[in]*/ long lSrcLen, /*[in]*/ long lFlags, /*[in]*/ long cchRequest, /*[out, size_is(,*pcchDest)]*/ WCHAR** ppszDest, /*[out]*/ long* pcchDest, /*[out]*/ long* plDestLen);
  44. STDMETHOD(UnlockWStr)(/*[in, size_is(cchSrc)]*/ const WCHAR* pszSrc, /*[in]*/ long cchSrc, /*[out]*/ long* pcchActual, /*[out]*/ long* plActualLen);
  45. // IMLangStringNotifySink
  46. STDMETHOD(OnRegisterAttr)(/*[in]*/ IUnknown* pUnk);
  47. STDMETHOD(OnUnregisterAttr)(/*[in]*/ IUnknown* pUnk);
  48. STDMETHOD(OnRequestEdit)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in]*/ long lNewLen, /*[in]*/ REFIID riid, /*[in]*/ LPARAM lParam, /*[in]*/ IUnknown* pUnk);
  49. STDMETHOD(OnCanceledEdit)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in]*/ long lNewLen, /*[in]*/ REFIID riid, /*[in]*/ LPARAM lParam, /*[in]*/ IUnknown* pUnk);
  50. STDMETHOD(OnChanged)(/*[in]*/ long lDestPos, /*[in]*/ long lDestLen, /*[in]*/ long lNewLen, /*[in]*/ REFIID riid, /*[in]*/ LPARAM lParam, /*[in]*/ IUnknown* pUnk);
  51. protected:
  52. ~CMLStrAttrWStr(void);
  53. IMLStrAttr* GetMLStrAttr(void) {return this;}
  54. HRESULT StartEndConnectionMLStr(IUnknown* const pUnk, BOOL fStart);
  55. IMLangString* m_pMLStr;
  56. DWORD m_dwMLStrCookie;
  57. };
  58. #endif //__ATTRSTRW_H_