mirror of https://github.com/tongzx/nt5src
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.
40 lines
918 B
40 lines
918 B
// rstrlogc.cpp : Defines the entry point for the console application.
|
|
//
|
|
|
|
#include "stdwin.h"
|
|
|
|
|
|
extern BOOL ReadAndFormatLogFileV3( LPCWSTR szFile );
|
|
|
|
|
|
int _cdecl
|
|
main()
|
|
{
|
|
LPWSTR *ppArgs;
|
|
int nArg;
|
|
LPCWSTR cszPath = L"rstrlog.dat";
|
|
|
|
ppArgs = ::CommandLineToArgvW( ::GetCommandLine(), &nArg );
|
|
if ( ppArgs == NULL )
|
|
{
|
|
printf("::CommandLineToArgvW failed, err=%u\n", ::GetLastError());
|
|
return( 1 );
|
|
}
|
|
|
|
if ( nArg >1 )
|
|
{
|
|
if ( ( ( ppArgs[1][0] == L'/' ) || ( ppArgs[1][0] == L'-' ) ) &&
|
|
( ( ppArgs[1][1] == L'h' ) || ( ppArgs[1][1] == L'H' ) || ( ppArgs[1][1] == L'?' ) ) &&
|
|
( ppArgs[1][2] == '\0' ) )
|
|
{
|
|
fputs("Usage: rstrlogc restore-log-file (V3, for Whistler)\n", stderr);
|
|
return( 9 );
|
|
}
|
|
cszPath = ppArgs[1];
|
|
}
|
|
|
|
ReadAndFormatLogFileV3( cszPath );
|
|
|
|
return( 0 );
|
|
}
|
|
|