00001 00007 #pragma once 00008 #include <bzscmn/file.h> 00009 #include <bzscmn/datetime.h> 00010 #include "../kdvm/kdxxx.h" 00011 00013 class PacketLogger 00014 { 00015 private: 00016 BazisLib::ManagedPointer<BazisLib::AIFile> m_pFile; 00017 BazisLib::FilePath m_LogFilePath; 00018 00019 unsigned m_SendPacketNumber; 00020 unsigned m_RecvPacketNumber; 00021 BazisLib::DateTime m_StartTime; 00022 00023 std::wstring m_SessionName; 00024 bool m_bTableHeaderPrinted; 00025 00026 public: 00027 PacketLogger(const TCHAR *pszKdPipeName); 00028 ~PacketLogger(); 00029 00030 void OnSendReceivePacket(bool bLoggingEnabled, 00031 bool bSendPacket, 00032 ULONG PacketType, 00033 PKD_BUFFER FirstBuffer, 00034 PKD_BUFFER SecondBuffer, 00035 PKD_CONTEXT KdContext); 00036 00037 void OnWindowsTerminationSimulated(); 00038 void OnWindowsTerminationSimDone(char *pDebugMsg); 00039 };