Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / dll / win32 / samlib / dllmain.c
index 4614e68..1b1e6a6 100644 (file)
@@ -16,8 +16,7 @@
  *  with this program; if not, write to the Free Software Foundation, Inc.,
  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-/* $Id$
- *
+/*
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS system libraries
  * PURPOSE:           SAM interface library
 
 /* INCLUDES *****************************************************************/
 
-#include <stdio.h>
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-
-#include "debug.h"
+#include "precomp.h"
 
-//#define LOG_DEBUG_MESSAGES
+WINE_DEFAULT_DEBUG_CHANNEL(samlib);
 
 /* GLOBALS *******************************************************************/
 
 
 /* FUNCTIONS *****************************************************************/
 
-BOOL WINAPI
-DllMain (HINSTANCE hInstance,
-        DWORD dwReason,
-        LPVOID lpReserved)
+BOOL
+WINAPI
+DllMain(HINSTANCE hInstance,
+        DWORD dwReason,
+        LPVOID lpReserved)
 {
-
-  return TRUE;
-}
-
-
-void
-DebugPrint (char* fmt,...)
-{
-#ifdef LOG_DEBUG_MESSAGES
-  char FileName[MAX_PATH];
-  HANDLE hLogFile;
-  DWORD dwBytesWritten;
-#endif
-  char buffer[512];
-  va_list ap;
-
-  va_start (ap, fmt);
-  vsprintf (buffer, fmt, ap);
-  va_end (ap);
-
-  OutputDebugStringA (buffer);
-
-#ifdef LOG_DEBUG_MESSAGES
-  strcpy (FileName, "C:\\reactos\\samlib.log");
-  hLogFile = CreateFileA (FileName,
-                         GENERIC_WRITE,
-                         0,
-                         NULL,
-                         OPEN_ALWAYS,
-                         FILE_ATTRIBUTE_NORMAL,
-                         NULL);
-  if (hLogFile == INVALID_HANDLE_VALUE)
-    return;
-
-  if (SetFilePointer(hLogFile, 0, NULL, FILE_END) == 0xFFFFFFFF)
-    {
-      CloseHandle (hLogFile);
-      return;
-    }
-
-  WriteFile (hLogFile,
-            buffer,
-            strlen(buffer),
-            &dwBytesWritten,
-            NULL);
-
-  CloseHandle (hLogFile);
-#endif
+    return TRUE;
 }
 
 /* EOF */