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.

63 lines
1.9 KiB

  1. // OleCvt.h : Declaration of the COleCvt
  2. #ifndef __OLECVT_H_
  3. #define __OLECVT_H_
  4. #include <asptlb.h> // Active Server Pages Definitions
  5. /////////////////////////////////////////////////////////////////////////////
  6. // COleCvt
  7. class ATL_NO_VTABLE COleCvt :
  8. public CComObjectRootEx<CComMultiThreadModel>,
  9. public CComCoClass<COleCvt, &CLSID_OleCvt>,
  10. public ISupportErrorInfo,
  11. public IConnectionPointContainerImpl<COleCvt>,
  12. public IDispatchImpl<IOleCvt, &IID_IOleCvt, &LIBID_OLEPRNLib>,
  13. public IObjectSafetyImpl<COleCvt>
  14. {
  15. public:
  16. COleCvt()
  17. {
  18. m_bOnStartPageCalled = FALSE;
  19. }
  20. public:
  21. DECLARE_REGISTRY_RESOURCEID(IDR_OLECVT)
  22. BEGIN_COM_MAP(COleCvt)
  23. COM_INTERFACE_ENTRY(IOleCvt)
  24. COM_INTERFACE_ENTRY(IDispatch)
  25. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  26. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  27. COM_INTERFACE_ENTRY_IMPL(IObjectSafety)
  28. END_COM_MAP()
  29. BEGIN_CONNECTION_POINT_MAP(COleCvt)
  30. END_CONNECTION_POINT_MAP()
  31. // ISupportsErrorInfo
  32. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  33. // IOleCvt
  34. public:
  35. STDMETHOD(get_ToUnicode)(BSTR bstrString, long lCodePage, /*[out, retval]*/ BSTR *pVal);
  36. STDMETHOD(get_DecodeUnicodeName)(BSTR bstrSrcName, /*[out, retval]*/ BSTR *pVal);
  37. STDMETHOD(get_EncodeUnicodeName)(BSTR bstrSrcName, /*[out, retval]*/ BSTR *pVal);
  38. STDMETHOD(get_ToUtf8)(BSTR bstrUnicode, /*[out, retval]*/ BSTR *pVal);
  39. //Active Server Pages Methods
  40. STDMETHOD(OnStartPage)(IUnknown* IUnk);
  41. STDMETHOD(OnEndPage)();
  42. private:
  43. HRESULT SetOleCvtScriptingError(DWORD dwError);
  44. CComPtr<IRequest> m_piRequest; //Request Object
  45. CComPtr<IResponse> m_piResponse; //Response Object
  46. CComPtr<ISessionObject> m_piSession; //Session Object
  47. CComPtr<IServer> m_piServer; //Server Object
  48. CComPtr<IApplicationObject> m_piApplication; //Application Object
  49. BOOL m_bOnStartPageCalled; //OnStartPage successful?
  50. };
  51. #endif //__OLECVT_H_