1*c2c66affSColin Finck // main.c :
2*c2c66affSColin Finck //
3*c2c66affSColin Finck #include <windows.h>
4*c2c66affSColin Finck #include <stdio.h>
5*c2c66affSColin Finck #include "regdump.h"
6*c2c66affSColin Finck
7*c2c66affSColin Finck
8*c2c66affSColin Finck HANDLE OutputHandle;
9*c2c66affSColin Finck HANDLE InputHandle;
10*c2c66affSColin Finck
11*c2c66affSColin Finck
GetInput(char * Buffer,int buflen)12*c2c66affSColin Finck DWORD GetInput(char* Buffer, int buflen)
13*c2c66affSColin Finck {
14*c2c66affSColin Finck DWORD Result;
15*c2c66affSColin Finck
16*c2c66affSColin Finck ReadConsoleA(InputHandle, Buffer, buflen, &Result, NULL);
17*c2c66affSColin Finck return Result;
18*c2c66affSColin Finck }
19*c2c66affSColin Finck
main(int argc,char * argv[])20*c2c66affSColin Finck int __cdecl main(int argc, char* argv[])
21*c2c66affSColin Finck {
22*c2c66affSColin Finck //AllocConsole();
23*c2c66affSColin Finck InputHandle = GetStdHandle(STD_INPUT_HANDLE);
24*c2c66affSColin Finck OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
25*c2c66affSColin Finck //return regmain(argc, argv);
26*c2c66affSColin Finck return regdump(argc, argv);
27*c2c66affSColin Finck }
28*c2c66affSColin Finck
29*c2c66affSColin Finck
30*c2c66affSColin Finck #ifndef __GNUC__
31*c2c66affSColin Finck
32*c2c66affSColin Finck //__declspec(dllimport) int __stdcall DllMain(void* hinstDll, unsigned long dwReason, void* reserved);
33*c2c66affSColin Finck
34*c2c66affSColin Finck char* args[] = { "regdump.exe", "0", "ansi", "verbose"};
35*c2c66affSColin Finck
mainCRTStartup(void)36*c2c66affSColin Finck int __cdecl mainCRTStartup(void)
37*c2c66affSColin Finck {
38*c2c66affSColin Finck
39*c2c66affSColin Finck //DllMain(NULL, DLL_PROCESS_ATTACH, NULL);
40*c2c66affSColin Finck
41*c2c66affSColin Finck main(1, args);
42*c2c66affSColin Finck return 0;
43*c2c66affSColin Finck }
44*c2c66affSColin Finck
45*c2c66affSColin Finck #endif /*__GNUC__*/
46