2 * Copyright 2016 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(wpc
);
29 static HINSTANCE wpc_instance
;
31 static HRESULT WINAPI
WindowsParentalControls_CreateInstance(IClassFactory
*iface
, IUnknown
*outer
, REFIID riid
, void **ppv
)
33 FIXME("(%s %p %p)\n", debugstr_guid(riid
), outer
, ppv
);
37 static HRESULT WINAPI
ClassFactory_QueryInterface(IClassFactory
*iface
, REFIID riid
, void **ppv
)
41 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
42 TRACE("(%p)->(IID_IUnknown %p)\n", iface
, ppv
);
44 }else if(IsEqualGUID(&IID_IClassFactory
, riid
)) {
45 TRACE("(%p)->(IID_IClassFactory %p)\n", iface
, ppv
);
50 IUnknown_AddRef((IUnknown
*)*ppv
);
54 FIXME("(%p)->(%s %p)\n", iface
, debugstr_guid(riid
), ppv
);
58 static ULONG WINAPI
ClassFactory_AddRef(IClassFactory
*iface
)
60 TRACE("(%p)\n", iface
);
64 static ULONG WINAPI
ClassFactory_Release(IClassFactory
*iface
)
66 TRACE("(%p)\n", iface
);
70 static HRESULT WINAPI
ClassFactory_LockServer(IClassFactory
*iface
, BOOL fLock
)
72 TRACE("(%p)->(%x)\n", iface
, fLock
);
76 static const IClassFactoryVtbl WPCFactoryVtbl
= {
77 ClassFactory_QueryInterface
,
80 WindowsParentalControls_CreateInstance
,
81 ClassFactory_LockServer
84 static IClassFactory WPCFactory
= { &WPCFactoryVtbl
};
86 /******************************************************************
89 BOOL WINAPI
DllMain(HINSTANCE hInstDLL
, DWORD fdwReason
, LPVOID lpv
)
91 TRACE("(%p %d %p)\n", hInstDLL
, fdwReason
, lpv
);
94 case DLL_WINE_PREATTACH
:
95 return FALSE
; /* prefer native version */
96 case DLL_PROCESS_ATTACH
:
97 DisableThreadLibraryCalls(hInstDLL
);
98 wpc_instance
= hInstDLL
;
105 /***********************************************************************
106 * DllGetClassObject (wpc.@)
108 HRESULT WINAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, void **ppv
)
110 if(IsEqualGUID(&CLSID_WindowsParentalControls
, rclsid
)) {
111 TRACE("(CLSID_WindowsParentalControls %s %p)\n", debugstr_guid(riid
), ppv
);
112 return IClassFactory_QueryInterface(&WPCFactory
, riid
, ppv
);
115 FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid
), debugstr_guid(riid
));
116 return CLASS_E_CLASSNOTAVAILABLE
;
119 /***********************************************************************
120 * DllCanUnloadNow (wpc.@)
122 HRESULT WINAPI
DllCanUnloadNow(void)
128 /***********************************************************************
129 * DllRegisterServer (wpc.@)
131 HRESULT WINAPI
DllRegisterServer(void)
134 return __wine_register_resources(wpc_instance
);
137 /***********************************************************************
138 * DllUnregisterServer (wpc.@)
140 HRESULT WINAPI
DllUnregisterServer(void)
143 return __wine_unregister_resources(wpc_instance
);