ReactOS 0.4.15-dev-8236-g99f0937
main.c File Reference
#include <stdio.h>
#include <windows.h>
#include <wingdi.h>
#include <winddi.h>
#include <d3dnthal.h>
#include <dll/directx/d3d8thk.h>
#include "test.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Variables

BOOL dumping_on =FALSE
 
FILEfs_file
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Definition at line 26 of file main.c.

27{
28 HANDLE hDirectDrawLocal;
29
30 if (argc == 2)
31 {
32 if (stricmp(argv[1],"-dump")==0)
33 {
35 }
36
37 if ( (stricmp(argv[1],"-help")==0) ||
38 (stricmp(argv[1],"-?")==0) ||
39 (stricmp(argv[1],"/help")==0) ||
40 (stricmp(argv[1],"/?")==0) )
41 {
42 printf("the %s support follow param \n",argv[0]);
43 printf("-dump : It dump all data it resvie to screen \n");
44 printf("-dumpfile filename : It dump all data it resvie to file \n");
45 printf("\nrember u can only use one of them at time \n");
46 exit(1);
47 }
48 }
49
50 if (argc == 3)
51 {
52 if (stricmp(argv[1],"-dumpfile")==0)
53 {
54 /* create or over write a file in binary mode, and redirect printf to the file */
55 if ( (fs_file = freopen(argv[2], "wb", stdout)) != NULL)
56 {
58 }
59 }
60 }
61
62 hDirectDrawLocal = test_NtGdiDdCreateDirectDrawObject();
63
64 test_NtGdiDdQueryDirectDrawObject(hDirectDrawLocal);
65
66 test_NtGdiDdGetScanLine(hDirectDrawLocal);
67
68 test_NtGdiDdWaitForVerticalBlank(hDirectDrawLocal);
69
70 test_NtGdiDdCanCreateSurface(hDirectDrawLocal);
71
72 test_NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal);
73
74 if (fs_file != NULL)
75 {
77 }
78 return 0;
79}
void test_NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal)
void test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal)
void test_NtGdiDdWaitForVerticalBlank(HANDLE hDirectDrawLocal)
static int argc
Definition: ServiceArgs.c:12
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define stricmp(_String1, _String2)
Definition: compat.h:24
HANDLE test_NtGdiDdCreateDirectDrawObject()
void test_NtGdiDdDeleteDirectDrawObject(HANDLE hDirectDrawLocal)
void test_NtGdiDdQueryDirectDrawObject(HANDLE hDirectDrawLocal)
#define printf
Definition: freeldr.h:97
_Check_return_ _CRTIMP FILE *__cdecl freopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode, _Inout_ FILE *_File)
#define stdout
Definition: stdio.h:99
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
BOOL dumping_on
Definition: main.c:15
FILE * fs_file
Definition: main.c:16
#define argv
Definition: mplay32.c:18
#define exit(n)
Definition: config.h:202

Variable Documentation

◆ dumping_on

BOOL dumping_on =FALSE

Definition at line 15 of file main.c.

Referenced by main(), and test_NtGdiDdQueryDirectDrawObject().

◆ fs_file

FILE* fs_file

Definition at line 16 of file main.c.

Referenced by main().