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.

143 lines
4.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1996-1997, Microsoft Corporation.
  4. //
  5. // File: ixsutil.hxx
  6. //
  7. // Contents: Query SSO class
  8. //
  9. // History: 29 Oct 1996 Alanw Created
  10. //
  11. //----------------------------------------------------------------------------
  12. #pragma once
  13. //-----------------------------------------------------------------------------
  14. // Include Files
  15. //-----------------------------------------------------------------------------
  16. // Query object interface declarations
  17. #include "ixssoifc.h"
  18. #include "ixserror.hxx"
  19. //-----------------------------------------------------------------------------
  20. // CixssoUtil Declaration
  21. //-----------------------------------------------------------------------------
  22. class CixssoUtil : public IixssoUtil, public ISupportErrorInfo
  23. {
  24. friend class CIxssoUtilCF;
  25. public:
  26. // IUnknown methods
  27. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj);
  28. STDMETHOD_(ULONG, AddRef)(THIS);
  29. STDMETHOD_(ULONG, Release)(THIS);
  30. // IDispatch methods
  31. STDMETHOD(GetTypeInfoCount)(THIS_ UINT * pctinfo);
  32. STDMETHOD(GetTypeInfo)( THIS_
  33. UINT itinfo,
  34. LCID lcid,
  35. ITypeInfo * * pptinfo);
  36. STDMETHOD(GetIDsOfNames)( THIS_
  37. REFIID riid,
  38. OLECHAR * * rgszNames,
  39. UINT cNames,
  40. LCID lcid,
  41. DISPID * rgdispid);
  42. STDMETHOD(Invoke)( THIS_
  43. DISPID dispidMember,
  44. REFIID riid,
  45. LCID lcid,
  46. WORD wFlags,
  47. DISPPARAMS * pdispparams,
  48. VARIANT * pvarResult,
  49. EXCEPINFO * pexcepinfo,
  50. UINT * puArgErr);
  51. // ISupportErrorInfo method
  52. STDMETHOD(InterfaceSupportsErrorInfo)( THIS_
  53. REFIID riid);
  54. //
  55. // IixssoUtil methods
  56. //
  57. HRESULT STDMETHODCALLTYPE LocaleIDToISO(
  58. /* [in] */ LONG lcid,
  59. /* [retval][out] */ BSTR *val);
  60. HRESULT STDMETHODCALLTYPE ISOToLocaleID(
  61. /* [in] */ BSTR bstrLocale,
  62. /* [retval][out] */ LONG *pLcid);
  63. HRESULT STDMETHODCALLTYPE AddScopeToQuery(
  64. /* [in] */ IDispatch * pDisp,
  65. /* [in] */ BSTR pwszScope,
  66. /* [in] */ BSTR pwszDepth);
  67. HRESULT STDMETHODCALLTYPE TruncateToWhitespace(
  68. /* [in] */ BSTR bstrIn,
  69. /* [in] */ LONG maxLen,
  70. /* [retval][out] */ BSTR * pbstrOut);
  71. HRESULT STDMETHODCALLTYPE GetArrayElement(
  72. /* [in] */ VARIANT * pVariantArray,
  73. /* [in] */ LONG iElement,
  74. /* [out,retval] */ VARIANT * pOutputVariant);
  75. HRESULT STDMETHODCALLTYPE HTMLEncode(
  76. /* [in] */ BSTR bstrIn,
  77. /* [in] */ LONG codepage,
  78. /* [retval][out] */ BSTR * pbstrOut);
  79. HRESULT STDMETHODCALLTYPE URLEncode(
  80. /* [in] */ BSTR bstrIn,
  81. /* [in] */ LONG codepage,
  82. /* [retval][out] */ BSTR * pbstrOut);
  83. #if 0 // NOTE: not needed
  84. //
  85. // ASP standard methods
  86. //
  87. HRESULT STDMETHODCALLTYPE OnStartPage( IUnknown * pUnk );
  88. HRESULT STDMETHODCALLTYPE OnEndPage( void );
  89. #endif // 0 NOTE: not needed
  90. private:
  91. CixssoUtil( ITypeLib * pitlb );
  92. ~CixssoUtil();
  93. // Local methods
  94. SCODE SetError( SCODE sc,
  95. const WCHAR * loc = 0,
  96. unsigned eErrClass = 0 )
  97. {
  98. _err.SetError( sc, 0, 0, loc, eErrClass, _lcid );
  99. return sc;
  100. }
  101. LCID GetLCID() const { return _lcid; }
  102. // Property get/put helpers
  103. SCODE CopyWstrToBstr( BSTR * pbstr, WCHAR const * pwstr );
  104. ULONG _cRef;
  105. CixssoError _err;
  106. LCID _lcid; // Locale ID used for this query
  107. ITypeInfo * _ptinfo; // Type info from type lib
  108. };