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.

88 lines
2.3 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: parseapi.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Main interface to a file parser DLL.
  8. //
  9. // Owner: MHotchin
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef PARSEAPI_H
  13. #define PARSEAPI_H
  14. extern const IID IID_ILocParser;
  15. extern const IID IID_ILocParser_20;
  16. struct ParserInfo
  17. {
  18. CArray<PUID, PUID &> aParserIds;
  19. CLString strDescription;
  20. CLocExtensionList elExtensions;
  21. CLString strHelp;
  22. };
  23. DECLARE_INTERFACE_(ILocParser, IUnknown)
  24. {
  25. //
  26. // IUnknown standard interface.
  27. //
  28. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  29. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  30. STDMETHOD_(ULONG, Release)(THIS) PURE;
  31. //
  32. // Standard Debugging interface.
  33. //
  34. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  35. //
  36. // LocParser methods.
  37. //
  38. STDMETHOD(Init)(THIS_ IUnknown *) PURE;
  39. STDMETHOD(CreateFileInstance)(THIS_ ILocFile *REFERENCE, FileType) PURE;
  40. STDMETHOD_(void, GetParserInfo)(THIS_ ParserInfo REFERENCE)
  41. CONST_METHOD PURE;
  42. STDMETHOD_(void, GetFileDescriptions)(THIS_ CEnumCallback &)
  43. CONST_METHOD PURE;
  44. };
  45. //
  46. // Here for DOCUMENTATION only. Implementors should export the following
  47. // functions from every Parser DLL.
  48. //
  49. static const char * szParserEntryPointName = "DllGetParserCLSID";
  50. typedef void (STDAPICALLTYPE *PFNParserEntryPoint)(CLSID REFERENCE);
  51. STDAPI_(void) DllGetParserCLSID(CLSID REFERENCE);
  52. static const char * szParserRegisterEntryPointName = "DllRegisterParser";
  53. typedef HRESULT (STDAPICALLTYPE *PFNParserRegisterEntryPoint)(void);
  54. STDAPI DllRegisterParser(void);
  55. static const char *szParserUnregisterEntryPointName = "DllUnregisterParser";
  56. typedef HRESULT (STDAPICALLTYPE *PFNParserUnregisterEntryPoint)(void);
  57. STDAPI DllUnregisterParser(void);
  58. //
  59. // Implementors also need to implement the DllGetClassObject function.
  60. // An optional (but RECOMMENDED) function is DllCanUnloadNow.
  61. // See the OLE 2 reference manual for details about these functions.
  62. //
  63. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv);
  64. STDAPI DllCanUnloadNow(void);
  65. #endif // PARSEAPI_H