// Copyright (C) 1995-1999 Microsoft Corporation. All rights reserved. // ----------------------------------------------------------------------- // Microsoft Distributed Transaction Coordinator (Microsoft Confidential) // @doc // @module ILogRead.H | Header for interface . // Usage: // Clients of this DLL require this file. // @rev 0 | 05/09/95 | rbarnes | Cloned: For LOGMGR.DLL // ----------------------------------------------------------------------- #ifndef _ILGREAD_H # define _ILGREAD_H // =============================== // INCLUDES: // =============================== #include #include "logrec.h" // logmgr general types // =============================== // INTERFACE: ILogRead // =============================== //#define DUMPBUFFERSIZE 0x5230 (((RECORDSPACE /BYTESPERLINE)+1)*CHARSPERLINE) + (8 * CHARSPERLINE) // data plus header space #define BYTESPERLINE 16 #define CHARSPERLINE 80 #define DUMPBUFFERSIZE 0xA230 typedef enum _DUMP_TYPE { HEX_DUMP = 0, SUMMARY_DUMP = 1, RECORD_DUMP = 2 } DUMP_TYPE; typedef enum _LRP_SEEK { LRP_START = -1, LRP_END = -2, LRP_CUR = 0 } LRP_SEEK; // ----------------------------------------------------------------------- // @interface ILogRead | See also . // Description: // Provide read functionality // Usage: // Useless, but for an example. // ----------------------------------------------------------------------- DECLARE_INTERFACE_ (ILogRead, IUnknown) { // @comm IUnknown methods: See . STDMETHOD (QueryInterface) (THIS_ REFIID i_riid, LPVOID FAR* o_ppv) PURE; STDMETHOD_ (ULONG, AddRef) (THIS) PURE; STDMETHOD_ (ULONG, Release) (THIS) PURE; // @comm ILogRead methods: See . STDMETHOD (ReadInit) (void) PURE; STDMETHOD (ReadLRP ) (LRP lrpLRPStart, ULONG * ulByteLength, USHORT* usUserType) PURE; STDMETHOD (ReadNext ) (LRP *plrpLRP, ULONG * ulByteLength, USHORT* usUserType) PURE; STDMETHOD (GetCurrentLogRecord ) (char *pchBuffer) PURE; STDMETHOD (SetPosition)(LRP lrpLRPPosition)PURE; STDMETHOD (Seek) (LRP_SEEK llrpOrigin, LONG cbLogRecs, LRP* plrpNewLRP) PURE; STDMETHOD (GetCheckpoint) (DWORD cbNumCheckpoint, LRP* plrpLRP) PURE; STDMETHOD (DumpLog) (ULONG ulStartPage, ULONG ulEndPage, DUMP_TYPE ulDumpType, CHAR *szFileName) PURE; STDMETHOD (DumpPage) (CHAR * pchOutBuffer, ULONG ulPageNumber, DUMP_TYPE ulDumpType, ULONG *pulLength) PURE; virtual CHAR * DumpLRP (LRP lrpTarget,CHAR *szFormat,DUMP_TYPE ulDumpType, ULONG *pulLength) PURE; }; #endif _ILGREAD_H