Jacek Caban : wshom.ocx: Added Dll[Un]RegisterServer implementation.

Alexandre Julliard julliard at winehq.org
Thu Aug 4 12:22:10 CDT 2011


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Aug  4 10:31:29 2011 +0200

wshom.ocx: Added Dll[Un]RegisterServer implementation.

---

 dlls/wshom.ocx/Makefile.in  |    2 ++
 dlls/wshom.ocx/wshom.idl    |   20 ++++++++++++++++----
 dlls/wshom.ocx/wshom.rc     |   24 ++++++++++++++++++++++++
 dlls/wshom.ocx/wshom.rgs    |   34 ++++++++++++++++++++++++++++++++++
 dlls/wshom.ocx/wshom_main.c |   15 ++++++++++-----
 5 files changed, 86 insertions(+), 9 deletions(-)

diff --git a/dlls/wshom.ocx/Makefile.in b/dlls/wshom.ocx/Makefile.in
index e87eff5..5fb73d5 100644
--- a/dlls/wshom.ocx/Makefile.in
+++ b/dlls/wshom.ocx/Makefile.in
@@ -3,6 +3,8 @@ MODULE    = wshom.ocx
 C_SRCS = \
 	wshom_main.c
 
+RC_SRCS = wshom.rc
+
 IDL_TLB_SRCS = wshom.idl
 
 @MAKE_DLL_RULES@
diff --git a/dlls/wshom.ocx/wshom.idl b/dlls/wshom.ocx/wshom.idl
index 548e3db..a7dcb3a 100644
--- a/dlls/wshom.ocx/wshom.idl
+++ b/dlls/wshom.ocx/wshom.idl
@@ -115,7 +115,10 @@ library IWshRuntimeLibrary
 
     [
         helpstring("Windows Script Host Shell Object"),
-        uuid(f935dc22-1cf0-11d0-adb9-00c04fd58a0b)
+        uuid(f935dc22-1cf0-11d0-adb9-00c04fd58a0b),
+        threading(apartment),
+        progid("WScript.Shell.1"),
+        vi_progid("WScript.Shell")
     ]
     coclass IWshShell_Class {
         [default] interface IWshShell3;
@@ -123,7 +126,10 @@ library IWshRuntimeLibrary
 
     [
         helpstring("Windows Script Host Shell Object"),
-        uuid(72c24dd5-d70a-438b-8a42-98424b88afb8)
+        uuid(72c24dd5-d70a-438b-8a42-98424b88afb8),
+        threading(apartment),
+        progid("WScript.Shell.1"),
+        vi_progid("WScript.Shell")
     ]
     coclass WshShell {
         [default] interface IWshShell3;
@@ -131,7 +137,10 @@ library IWshRuntimeLibrary
 
     [
         helpstring("Windows Script Host Network Object"),
-        uuid(f935dc26-1cf0-11d0-adb9-00c04fd58a0b)
+        uuid(f935dc26-1cf0-11d0-adb9-00c04fd58a0b),
+        threading(apartment),
+        progid("WScript.Network.1"),
+        vi_progid("WScript.Network")
     ]
     coclass IWshNetwork_Class {
         [default] interface IWshNetwork2;
@@ -139,7 +148,10 @@ library IWshRuntimeLibrary
 
     [
         helpstring("Windows Script Host Network Object"),
-        uuid(093ff999-1ea0-4079-9525-9614c3504b74)
+        uuid(093ff999-1ea0-4079-9525-9614c3504b74),
+        threading(apartment),
+        progid("WScript.Network.1"),
+        vi_progid("WScript.Network")
     ]
     coclass WshNetwork {
         [default] interface IWshNetwork2;
diff --git a/dlls/wshom.ocx/wshom.rc b/dlls/wshom.ocx/wshom.rc
new file mode 100644
index 0000000..17fb45f
--- /dev/null
+++ b/dlls/wshom.ocx/wshom.rc
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2011 Jacek Caban for CodeWeavers
+ *
+ * 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 "windef.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+/* @makedep: wshom.rgs */
+1 WINE_REGISTRY wshom.rgs
diff --git a/dlls/wshom.ocx/wshom.rgs b/dlls/wshom.ocx/wshom.rgs
new file mode 100644
index 0000000..ce0ec77
--- /dev/null
+++ b/dlls/wshom.ocx/wshom.rgs
@@ -0,0 +1,34 @@
+HKCR
+{
+    NoRemove CLSID
+    {
+        '{f935dc22-1cf0-11d0-adb9-00c04fd58a0b}'
+        {
+            'Implemented Categories'
+            {
+                '{40fc6ed5-2438-11cf-a3db-080036f12502}'
+            }
+        }
+        '{72c24dd5-d70a-438b-8a42-98424b88afb8}'
+        {
+            'Implemented Categories'
+            {
+                '{40fc6ed5-2438-11cf-a3db-080036f12502}'
+            }
+        }
+        '{f935dc26-1cf0-11d0-adb9-00c04fd58a0b}'
+        {
+            'Implemented Categories'
+            {
+                '{40fc6ed5-2438-11cf-a3db-080036f12502}'
+            }
+        }
+        '{093ff999-1ea0-4079-9525-9614c3504b74}'
+        {
+            'Implemented Categories'
+            {
+                '{40fc6ed5-2438-11cf-a3db-080036f12502}'
+            }
+        }
+    }
+}
diff --git a/dlls/wshom.ocx/wshom_main.c b/dlls/wshom.ocx/wshom_main.c
index e9951ec..0266822 100644
--- a/dlls/wshom.ocx/wshom_main.c
+++ b/dlls/wshom.ocx/wshom_main.c
@@ -24,11 +24,15 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "ole2.h"
+#include "rpcproxy.h"
 
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(wshom);
 
+static HINSTANCE wshom_instance;
+
 /******************************************************************
  *              DllMain (wshom.ocx.@)
  */
@@ -41,7 +45,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
     case DLL_WINE_PREATTACH:
         return FALSE;  /* prefer native version */
     case DLL_PROCESS_ATTACH:
-        DisableThreadLibraryCalls(hInstDLL);
+        wshom_instance = hInstDLL;
+        DisableThreadLibraryCalls(wshom_instance);
         break;
     }
 
@@ -71,8 +76,8 @@ HRESULT WINAPI DllCanUnloadNow(void)
  */
 HRESULT WINAPI DllRegisterServer(void)
 {
-    FIXME("()\n");
-    return S_OK;
+    TRACE("()\n");
+    return __wine_register_resources(wshom_instance);
 }
 
 /***********************************************************************
@@ -80,6 +85,6 @@ HRESULT WINAPI DllRegisterServer(void)
  */
 HRESULT WINAPI DllUnregisterServer(void)
 {
-    FIXME("()\n");
-    return S_OK;
+    TRACE("()\n");
+    return __wine_unregister_resources(wshom_instance);
 }




More information about the wine-cvs mailing list