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.

87 lines
2.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: LocParser.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Written by: jstall
  8. //
  9. //-----------------------------------------------------------------------------
  10. #if !defined (PARSUTIL_LOCPARSER_H)
  11. #define PARSUTIL_LOCPARSER_H
  12. #pragma warning(disable : 4275)
  13. ////////////////////////////////////////////////////////////////////////////////
  14. class LTAPIENTRY CPULocParser : public ILocParser, public CLObject
  15. {
  16. // Construction
  17. public:
  18. CPULocParser(HINSTANCE hDll);
  19. virtual ~CPULocParser();
  20. // Data
  21. private:
  22. ULONG m_ulRefCount; // COM reference count
  23. HINSTANCE m_hInst; // Instance Handle
  24. BOOL m_fEnableVersion;
  25. BOOL m_fEnableBinary;
  26. BOOL m_fEnableStrVal;
  27. // COM Interfaces
  28. public:
  29. // IUnknown standard interface.
  30. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID * ppvObj);
  31. ULONG STDMETHODCALLTYPE AddRef();
  32. ULONG STDMETHODCALLTYPE Release();
  33. // Standard Debugging interface.
  34. void STDMETHODCALLTYPE AssertValidInterface() const;
  35. // ILocParser interface implementation
  36. HRESULT STDMETHODCALLTYPE Init(IUnknown *);
  37. HRESULT STDMETHODCALLTYPE CreateFileInstance(ILocFile * REFERENCE, FileType);
  38. void STDMETHODCALLTYPE GetParserInfo(ParserInfo &) const;
  39. void STDMETHODCALLTYPE GetFileDescriptions(CEnumCallback &) const;
  40. // Operations
  41. public:
  42. // Implementation
  43. protected:
  44. BOOL EnableInterface(REFIID riid, BOOL fEnable = TRUE);
  45. virtual BOOL IsInterfaceEnabled(REFIID riid) const;
  46. // Overrides
  47. public:
  48. // IUnknown
  49. virtual HRESULT OnQueryInterface(REFIID riid, LPVOID * ppvObj);
  50. // ILocParser
  51. virtual HRESULT OnInit(IUnknown *);
  52. virtual HRESULT OnCreateFileInstance(ILocFile * &, FileType) = 0;
  53. virtual void OnGetParserInfo(ParserInfo &) const = 0;
  54. virtual void OnGetFileDescriptions(CEnumCallback &) const = 0;
  55. // ILocVersion
  56. virtual void OnGetParserVersion(DWORD &dwMajor, DWORD &dwMinor,
  57. BOOL &fDebug) const = 0;
  58. // ILocBinary
  59. virtual BOOL OnCreateBinaryObject(BinaryId id, CLocBinary * REFERENCE pBinary);
  60. // ILocStringValidation
  61. virtual CVC::ValidationCode OnValidateString(const CLocTypeId &ltiType,
  62. const CLocTranslation &, CReporter *pReporter,
  63. const CContext &context) = 0;
  64. };
  65. ////////////////////////////////////////////////////////////////////////////////
  66. #pragma warning(default : 4275)
  67. #endif