Module: wine Branch: master Commit: 10d256c64fc4317e7ad17eac62e6cc91464a166e URL: https://gitlab.winehq.org/wine/wine/-/commit/10d256c64fc4317e7ad17eac62e6cc9...
Author: Robert Wilhelm robert.wilhelm@gmx.net Date: Sat Nov 26 23:28:57 2022 +0100
wshom.ocx: Added WshNetwork class factory implementation.
---
dlls/wshom.ocx/Makefile.in | 1 + dlls/wshom.ocx/network.c | 29 +++++++++++++++++++++++++++++ dlls/wshom.ocx/wshom_main.c | 13 +++++++++++++ dlls/wshom.ocx/wshom_private.h | 1 + 4 files changed, 44 insertions(+)
diff --git a/dlls/wshom.ocx/Makefile.in b/dlls/wshom.ocx/Makefile.in index 1264e9c96a5..27297eed2f0 100644 --- a/dlls/wshom.ocx/Makefile.in +++ b/dlls/wshom.ocx/Makefile.in @@ -4,6 +4,7 @@ IMPORTS = uuid oleaut32 ole32 shell32 user32 advapi32 scrrun EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \ + network.c \ shell.c \ wshom_main.c
diff --git a/dlls/wshom.ocx/network.c b/dlls/wshom.ocx/network.c new file mode 100644 index 00000000000..64b8551e6cc --- /dev/null +++ b/dlls/wshom.ocx/network.c @@ -0,0 +1,29 @@ +/* + * Copyright 2022 Robert Wilhelm + * + * 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 "wshom_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wshom); + +HRESULT WINAPI WshNetworkFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) +{ + FIXME("(%p %s %p)\n", outer, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} diff --git a/dlls/wshom.ocx/wshom_main.c b/dlls/wshom.ocx/wshom_main.c index b2dc79a1948..aed9f2dedf4 100644 --- a/dlls/wshom.ocx/wshom_main.c +++ b/dlls/wshom.ocx/wshom_main.c @@ -209,7 +209,16 @@ static const IClassFactoryVtbl WshShellFactoryVtbl = { ClassFactory_LockServer };
+static const IClassFactoryVtbl WshNetworkFactoryVtbl = { + ClassFactory_QueryInterface, + ClassFactory_AddRef, + ClassFactory_Release, + WshNetworkFactory_CreateInstance, + ClassFactory_LockServer +}; + static IClassFactory WshShellFactory = { &WshShellFactoryVtbl }; +static IClassFactory WshNetworkFactory = { &WshNetworkFactoryVtbl };
/****************************************************************** * DllMain (wshom.ocx.@) @@ -241,6 +250,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv); return IClassFactory_QueryInterface(&WshShellFactory, riid, ppv); } + else if(IsEqualGUID(&CLSID_WshNetwork, rclsid)) { + TRACE("(CLSID_WshNetwork %s %p)\n", debugstr_guid(riid), ppv); + return IClassFactory_QueryInterface(&WshNetworkFactory, riid, ppv); + }
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; diff --git a/dlls/wshom.ocx/wshom_private.h b/dlls/wshom.ocx/wshom_private.h index a10cf2683a3..c2a66bf0610 100644 --- a/dlls/wshom.ocx/wshom_private.h +++ b/dlls/wshom.ocx/wshom_private.h @@ -47,3 +47,4 @@ struct provideclassinfo { extern void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo) DECLSPEC_HIDDEN;
HRESULT WINAPI WshShellFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; +HRESULT WINAPI WshNetworkFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;