diff --git a/configure b/configure index f0081fbdc79..63689264ceb 100755 --- a/configure +++ b/configure @@ -1387,6 +1387,7 @@ enable_scarddlg enable_sccbase enable_schannel enable_schedsvc +enable_scrobj enable_scrrun enable_scsiport_sys enable_secur32 @@ -18272,6 +18273,7 @@ wine_fn_config_dll schannel enable_schannel wine_fn_config_test dlls/schannel/tests schannel_test wine_fn_config_dll schedsvc enable_schedsvc clean wine_fn_config_test dlls/schedsvc/tests schedsvc_test clean +wine_fn_config_dll scrobj enable_scrobj clean wine_fn_config_dll scrrun enable_scrrun clean wine_fn_config_test dlls/scrrun/tests scrrun_test clean wine_fn_config_dll scsiport.sys enable_scsiport_sys diff --git a/configure.ac b/configure.ac index 26be5e60676..d30dd9c32e5 100644 --- a/configure.ac +++ b/configure.ac @@ -3332,6 +3332,7 @@ WINE_CONFIG_DLL(schannel) WINE_CONFIG_TEST(dlls/schannel/tests) WINE_CONFIG_DLL(schedsvc,,[clean]) WINE_CONFIG_TEST(dlls/schedsvc/tests,[clean]) +WINE_CONFIG_DLL(scrobj,,[clean]) WINE_CONFIG_DLL(scrrun,,[clean]) WINE_CONFIG_TEST(dlls/scrrun/tests,[clean]) WINE_CONFIG_DLL(scsiport.sys) diff --git a/dlls/scrobj/Makefile.in b/dlls/scrobj/Makefile.in new file mode 100644 index 00000000000..fae99d1425c --- /dev/null +++ b/dlls/scrobj/Makefile.in @@ -0,0 +1,6 @@ +MODULE = scrobj.dll + +C_SRCS = \ + scrobj.c + +IDL_SRCS = scrobj.idl diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c new file mode 100644 index 00000000000..98f7c88e24f --- /dev/null +++ b/dlls/scrobj/scrobj.c @@ -0,0 +1,84 @@ +/* + * Copyright 2017 Nikolay Sivov + * + * 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 + */ +#define COBJMACROS + +#include "config.h" +#include + +#include "windef.h" +#include "winbase.h" +#include "ole2.h" +#include "olectl.h" +#include "rpcproxy.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(scrobj); + +static HINSTANCE scrobj_instance; + +BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) +{ + TRACE("%p, %u, %p\n", hinst, reason, reserved); + + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinst); + scrobj_instance = hinst; + break; + } + return TRUE; +} + +/*********************************************************************** + * DllRegisterServer (scrobj.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + TRACE("()\n"); + return __wine_register_resources(scrobj_instance); +} + +/*********************************************************************** + * DllUnregisterServer (scrobj.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + TRACE("()\n"); + return __wine_unregister_resources(scrobj_instance); +} + +/*********************************************************************** + * DllGetClassObject (scrobj.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) +{ + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllCanUnloadNow (scrobj.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} diff --git a/dlls/scrobj/scrobj.idl b/dlls/scrobj/scrobj.idl new file mode 100644 index 00000000000..80189ae44e4 --- /dev/null +++ b/dlls/scrobj/scrobj.idl @@ -0,0 +1,97 @@ +/* + * Copyright 2017 Nikolay Sivov + * + * 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 + +import "unknwn.idl"; +import "objidl.idl"; +import "oaidl.idl"; + +[ + uuid(06290c00-48aa-11d2-8432-006008c3fbfc), + version(1.0) +] +library Scriptlet +{ + importlib("stdole2.tlb"); + + [ + uuid(2de0a190-a1a4-11d1-b382-00a0c911e8b2), + dual, + oleautomation + ] + interface IGenScriptletTLib : IDispatch + { + [id(0x1)] + HRESULT AddURL([in] BSTR url); + + [id(0x2), propput] + HRESULT Path([in] BSTR path); + + [id(0x2), propget] + HRESULT Path([out, retval] BSTR *path); + + [id(0x4), propput] + HRESULT Doc([in] BSTR doc); + + [id(0x4), propget] + HRESULT Doc([out, retval] BSTR *doc); + + [id(0x5), propput] + HRESULT Name([in] BSTR name); + + [id(0x5), propget] + HRESULT Name([out, retval] BSTR *name); + + [id(0x6), propput] + HRESULT MajorVersion([in] WORD version); + + [id(0x6), propget] + HRESULT MajorVersion([out, retval] WORD *version); + + [id(0x7), propput] + HRESULT MinorVersion([in] WORD version); + + [id(0x7), propget] + HRESULT MinorVersion([out, retval] WORD *version); + + [id(0x3)] + HRESULT Write(); + + [id(0x8)] + HRESULT Reset(); + + [id(0x9), propput] + HRESULT GUID([in] BSTR guid); + + [id(0x9), propget] + HRESULT GUID([out, retval] BSTR *guid); + } + +} + +[ + uuid(06290bd5-48aa-11d2-8432-006008c3fbfc ), + version(1.0), + threading(apartment), + progid("Scriptlet.TypeLib") +] +coclass TypeLib +{ + [default] interface IGenScriptletTLib; +} diff --git a/dlls/scrobj/scrobj.spec b/dlls/scrobj/scrobj.spec new file mode 100644 index 00000000000..b16365d0c9f --- /dev/null +++ b/dlls/scrobj/scrobj.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer()