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.

48 lines
1.5 KiB

  1. // TestITN_CHS.h : Declaration of the CTestITN_CHS
  2. #ifndef __TESTITN_CHS_H_
  3. #define __TESTITN_CHS_H_
  4. #include "resource.h" // main symbols
  5. #include <wchar.h> // for swprintf()
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CTestITN_CHS
  8. class ATL_NO_VTABLE CTestITN_CHS :
  9. public CComObjectRootEx<CComMultiThreadModel>,
  10. public CComCoClass<CTestITN_CHS, &CLSID_TestITN_CHS>,
  11. public ISpCFGInterpreter
  12. {
  13. public:
  14. CTestITN_CHS() : m_pSite( NULL )
  15. {
  16. }
  17. DECLARE_REGISTRY_RESOURCEID(IDR_TESTITN_CHS)
  18. DECLARE_PROTECT_FINAL_CONSTRUCT()
  19. BEGIN_COM_MAP(CTestITN_CHS)
  20. COM_INTERFACE_ENTRY(ISpCFGInterpreter)
  21. END_COM_MAP()
  22. // ISpCFGInterptreter
  23. public:
  24. STDMETHODIMP InitGrammar(const WCHAR * pszGrammarName, const void ** pvGrammarData);
  25. STDMETHODIMP Interpret(ISpPhraseBuilder * pInterpretRule, const ULONG ulFirstElement, const ULONG ulCountOfElements, ISpCFGInterpreterSite * pSite);
  26. private:
  27. ISpCFGInterpreterSite *m_pSite;
  28. HRESULT AddPropertyAndReplacement( const WCHAR *szBuff,
  29. const DOUBLE dblValue,
  30. const ULONG ulMinPos,
  31. const ULONG ulMaxPos,
  32. const ULONG ulFirstElement,
  33. const ULONG ulCountOfElements);
  34. public:
  35. CComPtr<ISpPhraseBuilder> m_cpPhrase; // Decalred as a member to prevent repeated construct/destroy
  36. };
  37. #endif //__TESTITN_CHS_H_