ReactOS  0.4.12-dev-418-g3df31a8
main.c
Go to the documentation of this file.
1 
2 #include <windows.h>
3 #include <stdio.h>
4 
5 #include <ddrawi.h>
6 #include <d3dhal.h>
7 
8 /* Black Box program for D3DParseUnknownCommand in ddraw.dll
9  *
10  * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll
11  * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document
12  * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for
13  * D3DHAL_DP2COMMAND dp2command->bCommand so I wrote this small scanner
14  *
15  * it will show D3DParseUnknownCommand dp2command->bCommand support follow command
16  * command hex dec
17  * D3DDP2OP_VIEWPORTINFO (aka 0x1c) 28
18  * D3DDP2OP_WINFO (aka 0x1d) 29
19  * Unknown (aka 0x0d) 13
20  *
21  * no doc in msdn about command 13 (dec) I will exaime it later
22  *
23  */
24 
25 INT main(INT argc, TCHAR *argv[]);
26 VOID BuildReturnCode(DWORD * ReturnCode);
27 
29 {
30  DWORD ReturnCode[256];
31 
32  BuildReturnCode(ReturnCode);
33 
34  return 0;
35 }
36 
37 VOID BuildReturnCode(DWORD * ReturnCode)
38 {
39  INT t;
40  D3DHAL_DP2COMMAND dp2command;
41  DWORD lplpvReturnedCommand[2];
42 
43  for (t=0;t<256;t++)
44  {
45  dp2command.bCommand = t;
46  ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ;
47  printf("D3DParseUnknownCommand return code = %x command %d \n", (UINT)ReturnCode[t], t);
48  }
49 }
static int argc
Definition: ServiceArgs.c:12
VOID BuildReturnCode(DWORD *ReturnCode)
Definition: main.c:37
GLdouble GLdouble t
Definition: gl.h:2047
#define argv
Definition: mplay32.c:18
int32_t INT
Definition: typedefs.h:56
char TCHAR
Definition: xmlstorage.h:189
unsigned int UINT
Definition: ndis.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
int main(int argc, const char *argv[])
Definition: main.c:122
HRESULT WINAPI D3DParseUnknownCommand(LPVOID lpCmd, LPVOID *lpRetCmd)
Definition: main.c:357
#define printf
Definition: config.h:203