[PATCH 2/5] shcore: Add DLL

Alex Henrie alexhenrie24 at gmail.com
Mon Jan 22 22:55:35 CST 2018


From: Sebastian Lackner <sebastian at fds-team.de>

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
Patch adapted from Wine Staging.

 configure.ac            |  1 +
 dlls/shcore/Makefile.in |  4 +++
 dlls/shcore/main.c      | 43 +++++++++++++++++++++++++
 dlls/shcore/shcore.spec | 83 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/make_specfiles    |  7 ++++-
 5 files changed, 137 insertions(+), 1 deletion(-)
 create mode 100644 dlls/shcore/Makefile.in
 create mode 100644 dlls/shcore/main.c
 create mode 100644 dlls/shcore/shcore.spec

diff --git a/configure.ac b/configure.ac
index 8bedfe87a5..e5afd6b1c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3529,6 +3529,7 @@ WINE_CONFIG_TEST(dlls/setupapi/tests)
 WINE_CONFIG_DLL(setupx.dll16,enable_win16)
 WINE_CONFIG_DLL(sfc,,[implib])
 WINE_CONFIG_DLL(sfc_os,,[implib])
+WINE_CONFIG_DLL(shcore)
 WINE_CONFIG_DLL(shdoclc,,[clean])
 WINE_CONFIG_DLL(shdocvw,,[clean,implib])
 WINE_CONFIG_TEST(dlls/shdocvw/tests)
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
new file mode 100644
index 0000000000..ec2e95f526
--- /dev/null
+++ b/dlls/shcore/Makefile.in
@@ -0,0 +1,4 @@
+MODULE    = shcore.dll
+
+C_SRCS = \
+	main.c
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
new file mode 100644
index 0000000000..abb9b3bdb8
--- /dev/null
+++ b/dlls/shcore/main.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016 Sebastian Lackner
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "shellscalingapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shcore);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+    TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+    switch (reason)
+    {
+        case DLL_WINE_PREATTACH:
+            return FALSE;  /* prefer native version */
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(instance);
+            break;
+    }
+
+    return TRUE;
+}
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
new file mode 100644
index 0000000000..12a4ef3ee8
--- /dev/null
+++ b/dlls/shcore/shcore.spec
@@ -0,0 +1,83 @@
+@ stdcall CommandLineToArgvW(wstr ptr) shell32.CommandLineToArgvW
+@ stub CreateRandomAccessStreamOnFile
+@ stub CreateRandomAccessStreamOverStream
+@ stub CreateStreamOverRandomAccessStream
+@ stdcall -private DllCanUnloadNow() shell32.DllCanUnloadNow
+@ stub DllGetActivationFactory
+@ stdcall -private DllGetClassObject(ptr ptr ptr) shell32.DllGetClassObject
+@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID
+@ stub GetDpiForMonitor
+@ stub GetDpiForShellUIComponent
+@ stub GetProcessDpiAwareness
+@ stub GetProcessReference
+@ stub GetScaleFactorForDevice
+@ stub GetScaleFactorForMonitor
+@ stub IStream_Copy
+@ stdcall IStream_Read(ptr ptr long) shlwapi.IStream_Read
+@ stub IStream_ReadStr
+@ stdcall IStream_Reset(ptr) shlwapi.IStream_Reset
+@ stdcall IStream_Size(ptr ptr) shlwapi.IStream_Size
+@ stdcall IStream_Write(ptr ptr long) shlwapi.IStream_Write
+@ stub IStream_WriteStr
+@ stdcall IUnknown_AtomicRelease(long) shlwapi.IUnknown_AtomicRelease
+@ stdcall IUnknown_GetSite(ptr ptr ptr) shlwapi.IUnknown_GetSite
+@ stdcall IUnknown_QueryService(ptr ptr ptr ptr) shlwapi.IUnknown_QueryService
+@ stdcall IUnknown_Set(ptr ptr) shlwapi.IUnknown_Set
+@ stdcall IUnknown_SetSite(ptr ptr) shlwapi.IUnknown_SetSite
+@ stdcall IsOS(long) shlwapi.IsOS
+@ stub RegisterScaleChangeEvent
+@ stub RegisterScaleChangeNotifications
+@ stub RevokeScaleChangeNotifications
+@ stdcall SHAnsiToAnsi(str ptr long) shlwapi.SHAnsiToAnsi
+@ stdcall SHAnsiToUnicode(str ptr long) shlwapi.SHAnsiToUnicode
+@ stdcall SHCopyKeyA(long str long long) shlwapi.SHCopyKeyA
+@ stdcall SHCopyKeyW(long wstr long long) shlwapi.SHCopyKeyW
+@ stdcall SHCreateMemStream(ptr long) shlwapi.SHCreateMemStream
+@ stdcall SHCreateStreamOnFileA(str long ptr) shlwapi.SHCreateStreamOnFileA
+@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shlwapi.SHCreateStreamOnFileEx
+@ stdcall SHCreateStreamOnFileW(wstr long ptr) shlwapi.SHCreateStreamOnFileW
+@ stdcall SHCreateThread(ptr ptr long ptr) shlwapi.SHCreateThread
+@ stdcall SHCreateThreadRef(ptr ptr) shlwapi.SHCreateThreadRef
+@ stub SHCreateThreadWithHandle
+@ stdcall SHDeleteEmptyKeyA(long ptr) shlwapi.SHDeleteEmptyKeyA
+@ stdcall SHDeleteEmptyKeyW(long ptr) shlwapi.SHDeleteEmptyKeyW
+@ stdcall SHDeleteKeyA(long str) shlwapi.SHDeleteKeyA
+@ stdcall SHDeleteKeyW(long wstr) shlwapi.SHDeleteKeyW
+@ stdcall SHDeleteValueA(long  str  str) shlwapi.SHDeleteValueA
+@ stdcall SHDeleteValueW(long wstr wstr) shlwapi.SHDeleteValueW
+@ stdcall SHEnumKeyExA(long long str ptr) shlwapi.SHEnumKeyExA
+@ stdcall SHEnumKeyExW(long long wstr ptr) shlwapi.SHEnumKeyExW
+@ stdcall SHEnumValueA(long long str ptr ptr ptr ptr) shlwapi.SHEnumValueA
+@ stdcall SHEnumValueW(long long wstr ptr ptr ptr ptr) shlwapi.SHEnumValueW
+@ stdcall SHGetThreadRef(ptr) shlwapi.SHGetThreadRef
+@ stdcall SHGetValueA( long str str ptr ptr ptr ) shlwapi.SHGetValueA
+@ stdcall SHGetValueW( long wstr wstr ptr ptr ptr ) shlwapi.SHGetValueW
+@ stdcall SHOpenRegStream2A(long str str long) shlwapi.SHOpenRegStream2A
+@ stdcall SHOpenRegStream2W(long wstr wstr long) shlwapi.SHOpenRegStream2W
+@ stdcall SHOpenRegStreamA(long str str long) shlwapi.SHOpenRegStreamA
+@ stdcall SHOpenRegStreamW(long wstr wstr long) shlwapi.SHOpenRegStreamW
+@ stdcall SHQueryInfoKeyA(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyA
+@ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyW
+@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) shlwapi.SHQueryValueExA
+@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) shlwapi.SHQueryValueExW
+@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey
+@ stdcall SHRegGetIntW(ptr wstr long) shlwapi.SHRegGetIntW
+@ stdcall SHRegGetPathA(long str str ptr long) shlwapi.SHRegGetPathA
+@ stdcall SHRegGetPathW(long wstr wstr ptr long) shlwapi.SHRegGetPathW
+@ stdcall SHRegGetValueA( long str str long ptr ptr ptr ) shlwapi.SHRegGetValueA
+@ stub SHRegGetValueFromHKCUHKLM
+@ stdcall SHRegGetValueW( long wstr wstr long ptr ptr ptr ) shlwapi.SHRegGetValueW
+@ stdcall SHRegSetPathA(long str str str long) shlwapi.SHRegSetPathA
+@ stdcall SHRegSetPathW(long wstr wstr wstr long) shlwapi.SHRegSetPathW
+@ stdcall SHReleaseThreadRef() shlwapi.SHReleaseThreadRef
+@ stdcall SHSetThreadRef(ptr) shlwapi.SHSetThreadRef
+@ stdcall SHSetValueA(long  str  str long ptr long) shlwapi.SHSetValueA
+@ stdcall SHSetValueW(long wstr wstr long ptr long) shlwapi.SHSetValueW
+@ stdcall SHStrDupA(str ptr) shlwapi.SHStrDupA
+@ stdcall SHStrDupW(wstr ptr) shlwapi.SHStrDupW
+@ stdcall SHUnicodeToAnsi(wstr ptr ptr) shlwapi.SHUnicodeToAnsi
+@ stdcall SHUnicodeToUnicode(wstr ptr long) shlwapi.SHUnicodeToUnicode
+@ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) shell32.SetCurrentProcessExplicitAppUserModelID
+@ stub SetProcessDpiAwareness
+@ stub SetProcessReference
+@ stub UnregisterScaleChangeEvent
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 1833cb6d1b..417cf50ac3 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -322,9 +322,14 @@ my @dll_groups =
   "api-ms-win-core-shlwapi-legacy-l1-1-0",
   "api-ms-win-core-shlwapi-obsolete-l1-1-0",
   "api-ms-win-core-shlwapi-obsolete-l1-2-0",
-  "api-ms-win-shcore-scaling-l1-1-1",
   "api-ms-win-core-url-l1-1-0",
  ],
+ [
+  "shell32",
+  "shlwapi",
+  "shcore",
+  "api-ms-win-shcore-scaling-l1-1-1",
+ ],
  [
   "user32",
   "api-ms-win-core-stringansi-l1-1-0",
-- 
2.16.1




More information about the wine-devel mailing list