Source code of Windows XP (NT5)
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

  1. // rstrlogc.cpp : Defines the entry point for the console application.
  2. //
  3. #include "stdwin.h"
  4. extern BOOL ReadAndFormatLogFileV3( LPCWSTR szFile );
  5. int _cdecl
  6. main()
  7. {
  8. LPWSTR *ppArgs;
  9. int nArg;
  10. LPCWSTR cszPath = L"rstrlog.dat";
  11. ppArgs = ::CommandLineToArgvW( ::GetCommandLine(), &nArg );
  12. if ( ppArgs == NULL )
  13. {
  14. printf("::CommandLineToArgvW failed, err=%u\n", ::GetLastError());
  15. return( 1 );
  16. }
  17. if ( nArg >1 )
  18. {
  19. if ( ( ( ppArgs[1][0] == L'/' ) || ( ppArgs[1][0] == L'-' ) ) &&
  20. ( ( ppArgs[1][1] == L'h' ) || ( ppArgs[1][1] == L'H' ) || ( ppArgs[1][1] == L'?' ) ) &&
  21. ( ppArgs[1][2] == '\0' ) )
  22. {
  23. fputs("Usage: rstrlogc restore-log-file (V3, for Whistler)\n", stderr);
  24. return( 9 );
  25. }
  26. cszPath = ppArgs[1];
  27. }
  28. ReadAndFormatLogFileV3( cszPath );
  29. return( 0 );
  30. }