<xi:include href="p_dup_handle/p_dup_handle.xml" />
</directory>
+<directory name="readconsole">
+ <xi:include href="readconsole/readconsole.rbuild" />
+</directory>
+
<!-- fixme: regdump -->
<directory name="regqueryvalue">
--- /dev/null
+#include "stdio.h"\r
+#include "Windows.h"\r
+\r
+int main()\r
+{\r
+ TCHAR Buffer = 0;\r
+ DWORD Count = 0;\r
+\r
+ //\r
+ // We clear the mode, most importantly turn off ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT\r
+ // This is the same mode as that is set up by getch() when trying to get a char\r
+ //\r
+ SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),0);\r
+\r
+ //\r
+ // We read one char from the input and then return\r
+ //\r
+ ReadConsole(GetStdHandle(STD_INPUT_HANDLE),&Buffer,1,&Count,NULL);\r
+\r
+ //\r
+ // We print out this char as an int to show that infact a backspace does count as input\r
+ //\r
+ printf("You printed %c :: ", Buffer);\r
+ printf("With a value %d :: ", Buffer);\r
+ printf("Number of chars recieved %lu :: ", Count);\r
+ printf("Char equal to backspace %d \n", (Buffer == '\b'));\r
+\r
+ //\r
+ // :)\r
+ //\r
+ return 0;\r
+}\r
--- /dev/null
+<module name="readconsole" type="win32cui" installbase="bin" installname="readconsole.exe">\r
+ <define name="__USE_W32API" />\r
+ <library>kernel32</library>\r
+ <file>main.c</file>\r
+</module>\r