From 611b6725e12aa1d4a3e6b724dafe8cd6c3e75f76 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 24 Jun 2015 10:26:12 +0200 Subject: [PATCH] msscript.ocx: Added DLL registration implementation. --- dlls/msscript.ocx/Makefile.in | 1 + dlls/msscript.ocx/msscript.c | 11 ++++++++--- dlls/msscript.ocx/msscript.idl | 5 ++++- dlls/msscript.ocx/msscript.rc | 20 ++++++++++++++++++++ dlls/msscript.ocx/msscript.rgs | 27 +++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 dlls/msscript.ocx/msscript.rc create mode 100644 dlls/msscript.ocx/msscript.rgs diff --git a/dlls/msscript.ocx/Makefile.in b/dlls/msscript.ocx/Makefile.in index 6c0e09a1e65..0cbc964036b 100644 --- a/dlls/msscript.ocx/Makefile.in +++ b/dlls/msscript.ocx/Makefile.in @@ -1,4 +1,5 @@ MODULE = msscript.ocx +RC_SRCS = msscript.rc IDL_SRCS = msscript.idl C_SRCS = \ diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index 330ad7611fa..30666a007be 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -17,11 +17,15 @@ */ #include "windows.h" +#include "ole2.h" +#include "rpcproxy.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(msscript); +static HINSTANCE msscript_instance; + /****************************************************************** * DllMain (msscript.ocx.@) */ @@ -33,6 +37,7 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID lpv) case DLL_WINE_PREATTACH: return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: + msscript_instance = instance; DisableThreadLibraryCalls(instance); break; } @@ -63,8 +68,8 @@ HRESULT WINAPI DllCanUnloadNow(void) */ HRESULT WINAPI DllRegisterServer(void) { - FIXME("()\n"); - return E_NOTIMPL; + TRACE("()\n"); + return __wine_register_resources(msscript_instance); } /*********************************************************************** @@ -73,5 +78,5 @@ HRESULT WINAPI DllRegisterServer(void) HRESULT WINAPI DllUnregisterServer(void) { TRACE("()\n"); - return E_NOTIMPL; + return __wine_unregister_resources(msscript_instance); } diff --git a/dlls/msscript.ocx/msscript.idl b/dlls/msscript.ocx/msscript.idl index e498723c1ef..244e85b5f59 100644 --- a/dlls/msscript.ocx/msscript.idl +++ b/dlls/msscript.ocx/msscript.idl @@ -294,7 +294,10 @@ library MSScriptControl [ helpstring("ScriptControl Object"), - uuid(0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc) + uuid(0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc), + threading(apartment), + progid("MSScriptControl.ScriptControl.1"), + vi_progid("MSScriptControl.ScriptControl") ] coclass ScriptControl { [default] interface IScriptControl; diff --git a/dlls/msscript.ocx/msscript.rc b/dlls/msscript.ocx/msscript.rc new file mode 100644 index 00000000000..8a766fa7efd --- /dev/null +++ b/dlls/msscript.ocx/msscript.rc @@ -0,0 +1,20 @@ +/* + * Copyright 2015 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 + */ + +/* @makedep: msscript.rgs */ +2 WINE_REGISTRY msscript.rgs diff --git a/dlls/msscript.ocx/msscript.rgs b/dlls/msscript.ocx/msscript.rgs new file mode 100644 index 00000000000..46c266a1c90 --- /dev/null +++ b/dlls/msscript.ocx/msscript.rgs @@ -0,0 +1,27 @@ +HKCR +{ + NoRemove CLSID + { + '{0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc}' + { + 'Implemented Categories' + { + '{0de86a52-2baa-11cf-a229-00aa003d7352}' + '{0de86a53-2baa-11cf-a229-00aa003d7352}' + '{0de86a57-2baa-11cf-a229-00aa003d7352}' + '{40fc6ed4-2438-11cf-a3db-080036f12502}' + '{40fc6ed5-2438-11cf-a3db-080036f12502}' + } + Control + MiscStatus = s '0' + { + '1' = s '132499' + } + } + } + 'ScriptControl' = s 'ScriptControl Object' + { + CLSID = s '{0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc}' + CurVer = s 'MSScriptControl.ScriptControl.1' + } +}