return code scanner for D3DParseUnknownCommand to figout what it support.
authorMagnus Olsen <magnus@greatlord.com>
Sun, 22 Oct 2006 07:15:06 +0000 (07:15 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sun, 22 Oct 2006 07:15:06 +0000 (07:15 +0000)
svn path=/trunk/; revision=24596

rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild [new file with mode: 0644]
rosapps/tests/D3DParseUnknownCommand_show/main.c [new file with mode: 0644]
rosapps/tests/directory.rbuild

diff --git a/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild b/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild
new file mode 100644 (file)
index 0000000..146ba88
--- /dev/null
@@ -0,0 +1,11 @@
+<module name="D3DParseUnknownCommand_show" type="win32cui" installbase="bin" installname="D3DParseUnknownCommand_show" allowwarnings="true">
+       <define name="_WIN32_IE">0x0501</define>
+       <define name="_WIN32_WINNT">0x0501</define>
+       <define name="__USE_W32API" />
+       <library>kernel32</library>
+       <library>gdi32</library>
+       <library>ddraw</library>
+       <library>string</library>
+       <library>user32</library>
+       <file>main.c</file>
+</module>
\ No newline at end of file
diff --git a/rosapps/tests/D3DParseUnknownCommand_show/main.c b/rosapps/tests/D3DParseUnknownCommand_show/main.c
new file mode 100644 (file)
index 0000000..f23f948
--- /dev/null
@@ -0,0 +1,49 @@
+
+#include <windows.h>
+#include <stdio.h>
+
+#include <ddrawi.h>
+#include <d3dhal.h>
+
+/* Black Box program for D3DParseUnknownCommand in ddraw.dll
+ *
+ * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll 
+ * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document 
+ * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for 
+ * D3DHAL_DP2COMMAND dp2command->bCommand so I wrote this small scanner
+ *
+ * it will show D3DParseUnknownCommand  dp2command->bCommand support follow command
+ *  command                 hex      dec 
+ *  D3DDP2OP_VIEWPORTINFO (aka 0x1c) 28
+ *  D3DDP2OP_WINFO        (aka 0x1d) 29
+ *  Unknown               (aka 0x0d) 13
+ *
+ *  no doc in msdn about command 13 (dec) I will exaime it later 
+ *
+ */
+
+INT main(INT argc, CHAR argv[]);
+VOID BuildReturnCode(DWORD * ReturnCode);
+
+INT main(INT argc, TCHAR argv[])
+{
+    DWORD ReturnCode[256];
+
+    BuildReturnCode(ReturnCode);
+
+    return 0;
+}
+
+VOID BuildReturnCode(DWORD * ReturnCode)
+{
+    INT t;
+    D3DHAL_DP2COMMAND dp2command;
+    DWORD lplpvReturnedCommand[2];
+    
+    for (t=0;t<256;t++)
+    {
+       dp2command.bCommand = t;
+       ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ;   
+       printf("D3DParseUnknownCommand return code = %x command %d \n", ReturnCode[t], t);
+    }
+}
index e9de78e..d672754 100644 (file)
@@ -67,6 +67,9 @@
 <directory name="dnsquery">
        <xi:include href="dnsquery/dnsquery.rbuild" />
 </directory>
+<directory name="D3DParseUnknownCommand_show">
+       <xi:include href="D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild" />
+</directory>
 <directory name="DxHalTest">
        <xi:include href="DxHalTest/DxHalTest.rbuild" />
 </directory>