[PATCH 5/7] sapi: Register the typelib.

Huw Davies huw at codeweavers.com
Wed Sep 27 04:17:16 CDT 2017


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/sapi/Makefile.in      |  3 +++
 dlls/sapi/main.c           | 21 +++++++++++++++++++++
 dlls/sapi/sapi.spec        |  4 ++--
 dlls/sapi/sapi_typelib.idl | 23 +++++++++++++++++++++++
 4 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 dlls/sapi/sapi_typelib.idl

diff --git a/dlls/sapi/Makefile.in b/dlls/sapi/Makefile.in
index c740699..e4a0746 100644
--- a/dlls/sapi/Makefile.in
+++ b/dlls/sapi/Makefile.in
@@ -3,3 +3,6 @@ IMPORTS   = uuid ole32 user32 advapi32
 
 C_SRCS = \
 	main.c
+
+IDL_SRCS = \
+	sapi_typelib.idl
diff --git a/dlls/sapi/main.c b/dlls/sapi/main.c
index 5b247a9..53c3bef 100644
--- a/dlls/sapi/main.c
+++ b/dlls/sapi/main.c
@@ -25,16 +25,21 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
 
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(sapi);
 
+static HINSTANCE hinstance;
+
 BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
 {
     switch (reason)
     {
     case DLL_PROCESS_ATTACH:
+        hinstance = dll;
         DisableThreadLibraryCalls( dll );
         break;
     }
@@ -49,3 +54,19 @@ HRESULT WINAPI DllCanUnloadNow( void )
     TRACE( "()\n" );
     return S_FALSE;
 }
+
+/***********************************************************************
+ *          DllRegisterServer
+ */
+HRESULT WINAPI DllRegisterServer( void )
+{
+    return __wine_register_resources( hinstance );
+}
+
+/***********************************************************************
+ *          DllUnregisterServer
+ */
+HRESULT WINAPI DllUnregisterServer( void )
+{
+    return __wine_unregister_resources( hinstance );
+}
diff --git a/dlls/sapi/sapi.spec b/dlls/sapi/sapi.spec
index bf4587b..6f279a1 100644
--- a/dlls/sapi/sapi.spec
+++ b/dlls/sapi/sapi.spec
@@ -1,4 +1,4 @@
 @ stdcall -private DllCanUnloadNow()
 #@ stdcall -private DllGetClassObject(ptr ptr ptr)
-#@ stdcall -private DllRegisterServer()
-#@ stdcall -private DllUnregisterServer()
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/sapi/sapi_typelib.idl b/dlls/sapi/sapi_typelib.idl
new file mode 100644
index 0000000..b30e2e9
--- /dev/null
+++ b/dlls/sapi/sapi_typelib.idl
@@ -0,0 +1,23 @@
+/*
+ * Speech API (SAPI) typelib.
+ *
+ * Copyright (C) 2017 Huw Davies
+ *
+ * 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
+ */
+
+#pragma makedep regtypelib
+
+#include "sapi.idl"
-- 
2.7.4




More information about the wine-patches mailing list