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 28 INT main(INT argc, TCHAR *argv[]) 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 } 50