Alexandre Julliard : msxml6: Add a typelib resource.

Alexandre Julliard julliard at winehq.org
Wed Nov 10 11:09:37 CST 2010


Module: wine
Branch: master
Commit: 62c37253e62ca10bb6a57bdec58cbb5f768c39e2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=62c37253e62ca10bb6a57bdec58cbb5f768c39e2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Nov  9 23:10:23 2010 +0100

msxml6: Add a typelib resource.

---

 .gitignore                 |    1 +
 dlls/msxml6/Makefile.in    |    4 +++-
 dlls/msxml6/msxml6_tlb.idl |   19 +++++++++++++++++++
 dlls/msxml6/regsvr.c       |   10 ++++++++++
 dlls/msxml6/rsrc.rc        |    3 +++
 5 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/.gitignore b/.gitignore
index d1090c1..c15e617 100644
--- a/.gitignore
+++ b/.gitignore
@@ -95,6 +95,7 @@ dlls/msxml3/msxml3_v1.tlb
 dlls/msxml3/xslpattern.tab.c
 dlls/msxml3/xslpattern.tab.h
 dlls/msxml3/xslpattern.yy.c
+dlls/msxml6/msxml6_tlb.tlb
 dlls/ole32/dcom.h
 dlls/ole32/dcom_p.c
 dlls/ole32/irot.h
diff --git a/dlls/msxml6/Makefile.in b/dlls/msxml6/Makefile.in
index 23e1d1f..377b477 100644
--- a/dlls/msxml6/Makefile.in
+++ b/dlls/msxml6/Makefile.in
@@ -1,6 +1,6 @@
 EXTRADEFS = -DCOM_NO_WINDOWS_H
 MODULE    = msxml6.dll
-IMPORTS   = ole32 advapi32
+IMPORTS   = oleaut32 ole32 advapi32
 
 C_SRCS = \
 	main.c \
@@ -8,4 +8,6 @@ C_SRCS = \
 
 RC_SRCS = rsrc.rc
 
+IDL_TLB_SRCS = msxml6_tlb.idl
+
 @MAKE_DLL_RULES@
diff --git a/dlls/msxml6/msxml6_tlb.idl b/dlls/msxml6/msxml6_tlb.idl
new file mode 100644
index 0000000..1a2ddbd
--- /dev/null
+++ b/dlls/msxml6/msxml6_tlb.idl
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2010 Alexandre Julliard
+ *
+ * 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 "msxml6.idl"
diff --git a/dlls/msxml6/regsvr.c b/dlls/msxml6/regsvr.c
index af303e8..2cf08be 100644
--- a/dlls/msxml6/regsvr.c
+++ b/dlls/msxml6/regsvr.c
@@ -438,6 +438,7 @@ static struct progid const progid_list[] = {
  */
 HRESULT WINAPI DllRegisterServer(void)
 {
+    static const WCHAR msxml6W[] = {'m','s','x','m','l','6','.','d','l','l',0};
     HRESULT hr;
 
     TRACE("\n");
@@ -446,6 +447,13 @@ HRESULT WINAPI DllRegisterServer(void)
     if (SUCCEEDED(hr))
 	hr = register_progids(progid_list);
 
+    if (SUCCEEDED(hr))
+    {
+        ITypeLib *tl;
+        hr = LoadTypeLibEx( msxml6W, REGKIND_REGISTER, &tl );
+        if (SUCCEEDED(hr)) ITypeLib_Release( tl );
+    }
+
     return hr;
 }
 
@@ -461,6 +469,8 @@ HRESULT WINAPI DllUnregisterServer(void)
     hr = unregister_coclasses(coclass_list);
     if (SUCCEEDED(hr))
 	hr = unregister_progids(progid_list);
+    if (SUCCEEDED(hr))
+        hr = UnRegisterTypeLib( &LIBID_MSXML2, 6, 0, LOCALE_SYSTEM_DEFAULT, SYS_WIN32 );
 
     return hr;
 }
diff --git a/dlls/msxml6/rsrc.rc b/dlls/msxml6/rsrc.rc
index 766ea21..ccead7e 100644
--- a/dlls/msxml6/rsrc.rc
+++ b/dlls/msxml6/rsrc.rc
@@ -16,6 +16,9 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+/* @makedep: msxml6_tlb.tlb */
+1 TYPELIB msxml6_tlb.tlb
+
 #define WINE_OLESELFREGISTER
 #define WINE_FILEDESCRIPTION_STR "Wine MSXML 6.0"
 #define WINE_FILENAME_STR "msxml6.dll"




More information about the wine-cvs mailing list