*** empty log message ***
[reactos.git] / reactos / lib / crtdll / misc / dllmain.c
1 /*
2 * dllmain.c
3 *
4 * A stub DllMain function which will be called by DLLs which do not
5 * have a user supplied DllMain.
6 *
7 * Contributors:
8 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
9 *
10 * THIS SOFTWARE IS NOT COPYRIGHTED
11 *
12 * This source code is offered for use in the public domain. You may
13 * use, modify or distribute it freely.
14 *
15 * This code is distributed in the hope that it will be useful but
16 * WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
17 * DISCLAMED. This includes but is not limited to warrenties of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * $Revision: 1.2 $
21 * $Author: dwelch $
22 * $Date: 1999/04/14 00:51:19 $
23 *
24 */
25
26 #include <windows.h>
27 #include <stdarg.h>
28
29 void debug_printf(char* fmt, ...)
30 {
31 va_list args;
32 char buffer[255];
33 HANDLE OutputHandle;
34
35 AllocConsole();
36 OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
37 va_start(args,fmt);
38 vsprintf(buffer,fmt,args);
39 WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
40 va_end(args);
41 }
42
43 BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
44 {
45 return TRUE;
46 }
47