2007-02-11 16:57:31 +00:00
|
|
|
|
2007-02-16 20:14:24 +00:00
|
|
|
|
|
|
|
/* All testcase are base how windows 2000 sp4 acting */
|
|
|
|
|
|
|
|
|
2007-02-11 16:57:31 +00:00
|
|
|
#include <stdio.h>
|
2007-02-16 16:27:46 +00:00
|
|
|
/* SDK/DDK/NDK Headers. */
|
2007-02-11 16:57:31 +00:00
|
|
|
#include <windows.h>
|
2007-02-16 16:27:46 +00:00
|
|
|
#include <wingdi.h>
|
|
|
|
#include <winddi.h>
|
|
|
|
#include <d3dnthal.h>
|
2007-02-22 19:21:10 +00:00
|
|
|
#include <dll/directx/d3d8thk.h>
|
2007-02-11 16:57:31 +00:00
|
|
|
#include "test.h"
|
2007-02-16 16:27:46 +00:00
|
|
|
|
2007-02-24 13:58:25 +00:00
|
|
|
BOOL dumping_on =FALSE;
|
2008-04-19 07:21:03 +00:00
|
|
|
FILE *fs_file;
|
2007-02-24 13:58:25 +00:00
|
|
|
|
2007-10-19 23:01:40 +00:00
|
|
|
/* we using d3d8thk.dll it is doing the real syscall in windows 2000
|
2007-02-22 19:21:10 +00:00
|
|
|
* in ReactOS and Windows XP and higher d3d8thk.dll it linking to
|
2007-10-19 23:01:40 +00:00
|
|
|
* gdi32.dll instead doing syscall, gdi32.dll export DdEntry1-56
|
|
|
|
* and doing the syscall direcly. I did forget about it, This
|
|
|
|
* test program are now working on any Windows and ReactOS
|
2007-02-22 19:21:10 +00:00
|
|
|
* that got d3d8thk.dll
|
|
|
|
*/
|
2007-02-16 16:27:46 +00:00
|
|
|
|
2007-02-11 16:57:31 +00:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2007-02-16 16:27:46 +00:00
|
|
|
HANDLE hDirectDrawLocal;
|
|
|
|
|
2007-02-24 13:58:25 +00:00
|
|
|
if (argc == 2)
|
|
|
|
{
|
|
|
|
if (stricmp(argv[1],"-dump")==0)
|
|
|
|
{
|
|
|
|
dumping_on = TRUE;
|
|
|
|
}
|
2008-04-19 07:21:03 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
2021-09-13 01:33:14 +00:00
|
|
|
/* create or over write a file in binary mode, and redirect printf to the file */
|
|
|
|
if ( (fs_file = freopen(argv[2], "wb", stdout)) != NULL)
|
2008-04-19 07:21:03 +00:00
|
|
|
{
|
|
|
|
dumping_on = TRUE;
|
|
|
|
}
|
|
|
|
}
|
2007-02-24 13:58:25 +00:00
|
|
|
}
|
|
|
|
|
2007-02-16 16:27:46 +00:00
|
|
|
hDirectDrawLocal = test_NtGdiDdCreateDirectDrawObject();
|
2007-02-11 16:57:31 +00:00
|
|
|
|
2007-02-16 16:27:46 +00:00
|
|
|
test_NtGdiDdQueryDirectDrawObject(hDirectDrawLocal);
|
|
|
|
|
2007-05-12 10:14:22 +00:00
|
|
|
test_NtGdiDdGetScanLine(hDirectDrawLocal);
|
|
|
|
|
|
|
|
test_NtGdiDdWaitForVerticalBlank(hDirectDrawLocal);
|
|
|
|
|
|
|
|
test_NtGdiDdCanCreateSurface(hDirectDrawLocal);
|
|
|
|
|
2007-02-16 16:27:46 +00:00
|
|
|
test_NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal);
|
2008-04-19 07:21:03 +00:00
|
|
|
|
|
|
|
if (fs_file != NULL)
|
|
|
|
{
|
|
|
|
fclose(fs_file);
|
|
|
|
}
|
2007-02-11 16:57:31 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-02-24 13:32:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-16 16:27:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|