Author: greatlrd
Date: Sat Apr 19 02:21:03 2008
New Revision: 33032
URL: http://svn.reactos.org/svn/reactos?rev=33032&view=rev
Log:
add small help text and file dump from win32kdxtest
Modified:
trunk/rostests/dxtest/win32kdxtest/main.c
Modified: trunk/rostests/dxtest/win32kdxtest/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/win32kdxtest/main.…
==============================================================================
--- trunk/rostests/dxtest/win32kdxtest/main.c [iso-8859-1] (original)
+++ trunk/rostests/dxtest/win32kdxtest/main.c [iso-8859-1] Sat Apr 19 02:21:03 2008
@@ -13,6 +13,7 @@
#include "test.h"
BOOL dumping_on =FALSE;
+FILE *fs_file;
/* we using d3d8thk.dll it is doing the real syscall in windows 2000
* in ReactOS and Windows XP and higher d3d8thk.dll it linking to
@@ -32,6 +33,30 @@
{
dumping_on = TRUE;
}
+
+ if ( (stricmp(argv[1],"-help")==0) ||
+ (stricmp(argv[1],"-?")==0) ||
+ (stricmp(argv[1],"/help")==0) ||
+ (stricmp(argv[1],"/?")==0) )
+ {
+ printf("the %s support follow param \n",argv[0]);
+ printf("-dump : It dump all data it resvie to screen \n");
+ printf("-dumpfile filename : It dump all data it resvie to file \n");
+ printf("\nrember u can only use one of them at time \n");
+ exit(1);
+ }
+ }
+
+ if (argc == 3)
+ {
+ if (stricmp(argv[1],"-dumpfile")==0)
+ {
+ /* create or over write a file in binary mode, and redirect printf to the file */
+ if ( (fs_file = freopen(argv[2], "wb", stdout)) != NULL)
+ {
+ dumping_on = TRUE;
+ }
+ }
}
hDirectDrawLocal = test_NtGdiDdCreateDirectDrawObject();
@@ -45,6 +70,11 @@
test_NtGdiDdCanCreateSurface(hDirectDrawLocal);
test_NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal);
+
+ if (fs_file != NULL)
+ {
+ fclose(fs_file);
+ }
return 0;
}