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.

83 lines
2.7 KiB

  1. // Copyright (C) 1995-1999 Microsoft Corporation. All rights reserved.
  2. // -----------------------------------------------------------------------
  3. // Microsoft Distributed Transaction Coordinator (Microsoft Confidential)
  4. // @doc
  5. // @module ILogRead.H | Header for interface <i ILogRead>.<nl><nl>
  6. // Usage:<nl>
  7. // Clients of this DLL require this file.
  8. // @rev 0 | 05/09/95 | rbarnes | Cloned: For LOGMGR.DLL
  9. // -----------------------------------------------------------------------
  10. #ifndef _ILGREAD_H
  11. # define _ILGREAD_H
  12. // ===============================
  13. // INCLUDES:
  14. // ===============================
  15. #include <objbase.h>
  16. #include "logrec.h" // logmgr general types
  17. // ===============================
  18. // INTERFACE: ILogRead
  19. // ===============================
  20. //#define DUMPBUFFERSIZE 0x5230 (((RECORDSPACE /BYTESPERLINE)+1)*CHARSPERLINE) + (8 * CHARSPERLINE) // data plus header space
  21. #define BYTESPERLINE 16
  22. #define CHARSPERLINE 80
  23. #define DUMPBUFFERSIZE 0xA230
  24. typedef enum _DUMP_TYPE
  25. {
  26. HEX_DUMP = 0,
  27. SUMMARY_DUMP = 1,
  28. RECORD_DUMP = 2
  29. } DUMP_TYPE;
  30. typedef enum _LRP_SEEK
  31. {
  32. LRP_START = -1,
  33. LRP_END = -2,
  34. LRP_CUR = 0
  35. } LRP_SEEK;
  36. // -----------------------------------------------------------------------
  37. // @interface ILogRead | See also <c CILogRead>.<nl><nl>
  38. // Description:<nl>
  39. // Provide read functionality<nl><nl>
  40. // Usage:<nl>
  41. // Useless, but for an example.
  42. // -----------------------------------------------------------------------
  43. DECLARE_INTERFACE_ (ILogRead, IUnknown)
  44. {
  45. // @comm IUnknown methods: See <c CILogRead>.
  46. STDMETHOD (QueryInterface) (THIS_ REFIID i_riid, LPVOID FAR* o_ppv) PURE;
  47. STDMETHOD_ (ULONG, AddRef) (THIS) PURE;
  48. STDMETHOD_ (ULONG, Release) (THIS) PURE;
  49. // @comm ILogRead methods: See <c CILogRead>.
  50. STDMETHOD (ReadInit) (void) PURE;
  51. STDMETHOD (ReadLRP ) (LRP lrpLRPStart, ULONG * ulByteLength, USHORT* usUserType) PURE;
  52. STDMETHOD (ReadNext ) (LRP *plrpLRP, ULONG * ulByteLength, USHORT* usUserType) PURE;
  53. STDMETHOD (GetCurrentLogRecord ) (char *pchBuffer) PURE;
  54. STDMETHOD (SetPosition)(LRP lrpLRPPosition)PURE;
  55. STDMETHOD (Seek) (LRP_SEEK llrpOrigin, LONG cbLogRecs, LRP* plrpNewLRP) PURE;
  56. STDMETHOD (GetCheckpoint) (DWORD cbNumCheckpoint, LRP* plrpLRP) PURE;
  57. STDMETHOD (DumpLog) (ULONG ulStartPage, ULONG ulEndPage, DUMP_TYPE ulDumpType, CHAR *szFileName) PURE;
  58. STDMETHOD (DumpPage) (CHAR * pchOutBuffer, ULONG ulPageNumber, DUMP_TYPE ulDumpType, ULONG *pulLength) PURE;
  59. virtual CHAR * DumpLRP (LRP lrpTarget,CHAR *szFormat,DUMP_TYPE ulDumpType, ULONG *pulLength) PURE;
  60. };
  61. #endif _ILGREAD_H