[APPHELP] Use DbgPrint instead of OutputDebugString + fix SDBAPI_DEBUG_ALLOC
[reactos.git] / reactos / dll / appcompat / apphelp / sdbwrite.c
index de41bec..1f68c2f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2011 André Hentschel
  * Copyright 2013 Mislav Blažević
- * Copyright 2015,2016 Mark Jansen
+ * Copyright 2015-2017 Mark Jansen (mark.jansen@reactos.org)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -62,7 +62,7 @@ static BOOL WINAPI SdbpGetOrAddStringRef(PDB db, LPCWSTR string, TAGID* tagid)
     PDB buf = db->string_buffer;
     if (db->string_buffer == NULL)
     {
-        db->string_buffer = buf = SdbpAlloc(sizeof(DB));
+        db->string_buffer = buf = SdbAlloc(sizeof(DB));
         if (buf == NULL)
             return FALSE;
         buf->size = 128;
@@ -95,7 +95,7 @@ static BOOL WINAPI SdbpWriteStringtable(PDB db)
  * 
  * If a file already exists on specified path, that file shall be overwritten.
  * 
- * @note Use SdbCloseDatabasWrite to close the database opened with this function.
+ * @note Use SdbCloseDatabaseWrite to close the database opened with this function.
  *
  * @param [in]  path    Path to the new shim database.
  * @param [in]  type    Type of path. Either DOS_PATH or NT_PATH.
@@ -270,7 +270,7 @@ BOOL WINAPI SdbWriteStringRefTag(PDB db, TAG tag, TAGID tagid)
  *
  * @return  TRUE if it succeeds, FALSE if it fails.
  */
-BOOL WINAPI SdbWriteBinaryTag(PDB db, TAG tag, BYTE* data, DWORD size)
+BOOL WINAPI SdbWriteBinaryTag(PDB db, TAG tag, const BYTE* data, DWORD size)
 {
     if (!SdbpCheckTagType(tag, TAG_TYPE_BINARY))
         return FALSE;