[PATCH v5 1/3] uiribbon: Add DLL

Fabian Maurer dark.shadow4 at web.de
Sun Jul 30 12:40:31 CDT 2017


Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 configure                   |  2 ++
 configure.ac                |  1 +
 dlls/uiribbon/Makefile.in   |  5 +++
 dlls/uiribbon/main.c        | 84 +++++++++++++++++++++++++++++++++++++++++++++
 dlls/uiribbon/uiribbon.spec |  4 +++
 5 files changed, 96 insertions(+)
 create mode 100644 dlls/uiribbon/Makefile.in
 create mode 100644 dlls/uiribbon/main.c
 create mode 100644 dlls/uiribbon/uiribbon.spec

diff --git a/configure b/configure
index 5340523a80..8f7c97e617 100755
--- a/configure
+++ b/configure
@@ -1449,6 +1449,7 @@ enable_traffic
 enable_twain_32
 enable_ucrtbase
 enable_uiautomationcore
+enable_uiribbon
 enable_unicows
 enable_updspapi
 enable_url
@@ -18715,6 +18716,7 @@ wine_fn_config_dll typelib.dll16 enable_win16
 wine_fn_config_dll ucrtbase enable_ucrtbase implib
 wine_fn_config_test dlls/ucrtbase/tests ucrtbase_test
 wine_fn_config_dll uiautomationcore enable_uiautomationcore
+wine_fn_config_dll uiribbon enable_uiribbon
 wine_fn_config_dll unicows enable_unicows implib
 wine_fn_config_dll updspapi enable_updspapi
 wine_fn_config_dll url enable_url implib
diff --git a/configure.ac b/configure.ac
index 580c37c0cf..c21c18dd97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3500,6 +3500,7 @@ WINE_CONFIG_DLL(typelib.dll16,enable_win16)
 WINE_CONFIG_DLL(ucrtbase,,[implib])
 WINE_CONFIG_TEST(dlls/ucrtbase/tests)
 WINE_CONFIG_DLL(uiautomationcore)
+WINE_CONFIG_DLL(uiribbon)
 WINE_CONFIG_DLL(unicows,,[implib])
 WINE_CONFIG_DLL(updspapi)
 WINE_CONFIG_DLL(url,,[implib])
diff --git a/dlls/uiribbon/Makefile.in b/dlls/uiribbon/Makefile.in
new file mode 100644
index 0000000000..1ac13dfee0
--- /dev/null
+++ b/dlls/uiribbon/Makefile.in
@@ -0,0 +1,5 @@
+MODULE    = uiribbon.dll
+IMPORTS   = uuid ole32
+
+C_SRCS = \
+	main.c
diff --git a/dlls/uiribbon/main.c b/dlls/uiribbon/main.c
new file mode 100644
index 0000000000..7326378def
--- /dev/null
+++ b/dlls/uiribbon/main.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2017 Fabian Maurer
+ *
+ * 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 <stdarg.h>
+#include <string.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winreg.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(uiribbon);
+
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("(0x%p, %d, %p)\n", hInstDLL, fdwReason, lpvReserved);
+
+    switch (fdwReason)
+    {
+        case DLL_WINE_PREATTACH:
+            return FALSE;    /* prefer native version */
+        default:
+            break;
+    }
+
+    return TRUE;
+}
+
+/*******************************************************************************
+ * Retrieves class object from a DLL object
+ *
+ * NOTES
+ *    Docs say returns STDAPI
+ *
+ * PARAMS
+ *    rclsid [I] CLSID for the class object
+ *    riid   [I] Reference to identifier of interface for class object
+ *    ppv    [O] Address of variable to receive interface pointer for riid
+ *
+ * RETURNS
+ *    Success: S_OK
+ *    Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
+ *             E_UNEXPECTED
+ */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
+{
+    FIXME("(%s,%s,%p) stub!\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+
+    return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+    return S_FALSE;
+}
+
+HRESULT WINAPI DllRegisterServer(void)
+{
+    return S_OK;
+}
+
+HRESULT WINAPI DllUnregisterServer(void)
+{
+    return S_OK;
+}
diff --git a/dlls/uiribbon/uiribbon.spec b/dlls/uiribbon/uiribbon.spec
new file mode 100644
index 0000000000..b16365d0c9
--- /dev/null
+++ b/dlls/uiribbon/uiribbon.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
-- 
2.13.3




More information about the wine-patches mailing list