/****************************************************************************** * * Copyright (c) 2000 Microsoft Corporation * * Module Name: * chglog.cpp * * Abstract: * Tool for enumerating the change log - forward/reverse * * Revision History: * Brijesh Krishnaswami (brijeshk) 04/09/2000 * created * SHeffner: Just grabbed the code, and put it into SRDiag. * *****************************************************************************/ //+--------------------------------------------------------------------------- // // Common Includes // //---------------------------------------------------------------------------- #include #include #include #include #include #include "srapi.h" #include #include "enumlogs.h" #include "srrpcapi.h" //+--------------------------------------------------------------------------- // // Function proto typing // //---------------------------------------------------------------------------- LPWSTR GetEventString(DWORD EventId); void EnumLog(char *szFileName, WCHAR *szDrive); struct _EVENT_STR_MAP { DWORD EventId; LPWSTR pEventStr; } EventMap[ 13 ] = { {SrEventInvalid , L"INVALID" }, {SrEventStreamChange, L"FILE-MODIFY" }, {SrEventAclChange, L"ACL-CHANGE" }, {SrEventAttribChange, L"ATTR-CHANGE" }, {SrEventStreamOverwrite,L"FILE-MODIFY" }, {SrEventFileDelete, L"FILE-DELETE" }, {SrEventFileCreate, L"FILE-CREATE" }, {SrEventFileRename, L"FILE-RENAME" }, {SrEventDirectoryCreate,L"DIR-CREATE" }, {SrEventDirectoryRename,L"DIR-RENAME" }, {SrEventDirectoryDelete,L"DIR-DELETE" }, {SrEventMountCreate, L"MNT-CREATE" }, {SrEventMountDelete, L"MNT-DELETE" } }; //+--------------------------------------------------------------------------- // // Function: GetEventString // // Synopsis: Transulates the EventString from the event ID // // Arguments: [EventID] -- DWord for the event code // // Returns: Pointer to maped string to the event coded // // History: 9/21/00 SHeffner Copied from Brijesh // // //---------------------------------------------------------------------------- LPWSTR GetEventString(DWORD EventId) { LPWSTR pStr = L"NOT-FOUND"; for( int i=0; i