https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f2f54a052e5cc53e259d4…
commit f2f54a052e5cc53e259d4d8829288c1cacbf944b
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Jan 3 23:24:54 2019 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Mon Feb 25 20:00:34 2019 +0100
[SDB] Initial SdbRegisterDatabase stubs
CORE-11301
---
dll/appcompat/apphelp/apphelp.c | 56 ++++++++++++++++++++++++++++++++++++--
dll/appcompat/apphelp/apphelp.spec | 5 ++--
2 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c
index 4c04e5d80e..1e1a65b67b 100644
--- a/dll/appcompat/apphelp/apphelp.c
+++ b/dll/appcompat/apphelp/apphelp.c
@@ -4,7 +4,7 @@
* PURPOSE: apphelp entrypoint / generic interface functions
* COPYRIGHT: Copyright 2011 André Hentschel
* Copyright 2013 Mislav Blaževic
- * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
+ * Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org)
*/
#define WIN32_NO_STATUS
@@ -66,7 +66,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
BOOL WINAPI ApphelpCheckInstallShieldPackage(void* ptr, LPCWSTR path)
{
- SHIM_WARN("stub: ptr=%p, path='%S'\r\n", ptr, path);
+ SHIM_WARN("stub: ptr=%p, path='%S'\n", ptr, path);
return TRUE;
}
@@ -240,3 +240,55 @@ ApphelpCheckRunAppEx(
return TRUE;
}
+
+/**
+ * @name SdbRegisterDatabaseEx
+ * Register an application compatibility database
+ *
+ * @param pszDatabasePath The database. Required
+ * @param dwDatabaseType The database type. SDB_DATABASE_*
+ * @param pTimeStamp The timestamp. When this argument is not provided, the system
time is used.
+ * @return TRUE on success, or FALSE on failure.
+ */
+BOOL WINAPI SdbRegisterDatabaseEx(
+ _In_ LPCTSTR pszDatabasePath,
+ _In_ DWORD dwDatabaseType,
+ _In_opt_ PULONGLONG pTimeStamp)
+{
+ SHIM_ERR("UNIMPLEMENTED, pszDatabasePath=%ws, dwDatabaseType=0x%x,
pTimeStamp=%p\n",
+ pszDatabasePath, dwDatabaseType, pTimeStamp);
+
+ return FALSE;
+}
+
+
+/**
+ * @name SdbRegisterDatabase
+ * Register an application compatibility database
+ *
+ * @param pszDatabasePath The database. Required
+ * @param dwDatabaseType The database type. SDB_DATABASE_*
+ * @return TRUE on success, or FALSE on failure.
+ */
+BOOL WINAPI SdbRegisterDatabase(
+ _In_ LPCTSTR pszDatabasePath,
+ _In_ DWORD dwDatabaseType)
+{
+ return SdbRegisterDatabaseEx(pszDatabasePath, dwDatabaseType, NULL);
+}
+
+
+/**
+ * @name SdbUnregisterDatabase
+ *
+ *
+ * @param pguidDB
+ * @return
+ */
+BOOL WINAPI SdbUnregisterDatabase(_In_ GUID *pguidDB)
+{
+ SHIM_ERR("UNIMPLEMENTED, pguidDB = %p\n", pguidDB);
+
+ return FALSE;
+}
+
diff --git a/dll/appcompat/apphelp/apphelp.spec b/dll/appcompat/apphelp/apphelp.spec
index 9509e6e975..83735803f6 100644
--- a/dll/appcompat/apphelp/apphelp.spec
+++ b/dll/appcompat/apphelp/apphelp.spec
@@ -129,7 +129,7 @@
@ stub SdbReadStringTagRef
@ stdcall SdbReadWORDTag(ptr long long)
@ stub SdbReadWORDTagRef
-@ stub SdbRegisterDatabase
+@ stdcall SdbRegisterDatabase(wstr long)
@ stdcall SdbReleaseDatabase(ptr)
@ stub SdbReleaseMatchingExe
@ stub SdbResolveDatabase
@@ -147,7 +147,7 @@
@ stdcall SdbTagIDToTagRef(ptr ptr long ptr)
@ stdcall SdbTagRefToTagID(ptr long ptr ptr)
@ stdcall SdbTagToString(long)
-@ stub SdbUnregisterDatabase
+@ stdcall SdbUnregisterDatabase(ptr)
@ stdcall SdbWriteBinaryTag(ptr long ptr long)
@ stdcall SdbWriteBinaryTagFromFile(ptr long wstr)
@ stub SdbWriteBYTETag
@@ -176,3 +176,4 @@
@ stub ShimDumpCache
@ stub ShimFlushCache
@ stdcall SetPermLayerState(wstr wstr long long long)
+@ stdcall SdbRegisterDatabaseEx(wstr long ptr)