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.

89 lines
2.3 KiB

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