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.1 KiB

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