Module: wine Branch: master Commit: 14cf136a8c68fa45a72c09409a19d13bb44d3bcf URL: http://source.winehq.org/git/wine.git/?a=commit;h=14cf136a8c68fa45a72c09409a...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Aug 24 12:40:35 2016 +0200
wpc: Added class factory stub implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wpc/wpc.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)
diff --git a/dlls/wpc/wpc.c b/dlls/wpc/wpc.c index 48f8edf..20db3fc 100644 --- a/dlls/wpc/wpc.c +++ b/dlls/wpc/wpc.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#define COBJMACROS + +#include "initguid.h" #include "wpcapi.h" #include "rpcproxy.h"
@@ -25,6 +28,61 @@ WINE_DEFAULT_DEBUG_CHANNEL(wpc);
static HINSTANCE wpc_instance;
+static HRESULT WINAPI WindowsParentalControls_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) +{ + FIXME("(%s %p %p)\n", debugstr_guid(riid), outer, ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv); + *ppv = iface; + }else if(IsEqualGUID(&IID_IClassFactory, riid)) { + TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv); + *ppv = iface; + } + + if(*ppv) { + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; + } + + FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) +{ + TRACE("(%p)\n", iface); + return 2; +} + +static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) +{ + TRACE("(%p)\n", iface); + return 1; +} + +static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock) +{ + TRACE("(%p)->(%x)\n", iface, fLock); + return S_OK; +} + +static const IClassFactoryVtbl WPCFactoryVtbl = { + ClassFactory_QueryInterface, + ClassFactory_AddRef, + ClassFactory_Release, + WindowsParentalControls_CreateInstance, + ClassFactory_LockServer +}; + +static IClassFactory WPCFactory = { &WPCFactoryVtbl }; + /****************************************************************** * DllMain */ @@ -49,6 +107,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { + if(IsEqualGUID(&CLSID_WindowsParentalControls, rclsid)) { + TRACE("(CLSID_WindowsParentalControls %s %p)\n", debugstr_guid(riid), ppv); + return IClassFactory_QueryInterface(&WPCFactory, riid, ppv); + } + FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid), debugstr_guid(riid)); return CLASS_E_CLASSNOTAVAILABLE; }