Module: wine Branch: master Commit: 0cb7301aecb1309f6f295aa1bc1a87345c922942 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0cb7301aecb1309f6f295aa1bc... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Aug 22 16:52:54 2016 +0200 wpc: Register WindowsParentalControls class. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 +- configure.ac | 2 +- dlls/wpc/Makefile.in | 2 ++ dlls/wpc/tests/wpc.c | 4 ++-- dlls/wpc/wpc.c | 22 ++++++++++++++++++++++ dlls/wpc/wpc.spec | 2 ++ dlls/wpc/wpc_classes.idl | 21 +++++++++++++++++++++ include/wpcapi.idl | 6 ++++++ 8 files changed, 57 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 12879c3..0211b20 100755 --- a/configure +++ b/configure @@ -18176,7 +18176,7 @@ wine_fn_config_test dlls/wmp/tests wmp_test wine_fn_config_dll wmvcore enable_wmvcore wine_fn_config_dll wnaspi32 enable_wnaspi32 implib wine_fn_config_dll wow32 enable_win16 implib -wine_fn_config_dll wpc enable_wpc +wine_fn_config_dll wpc enable_wpc clean wine_fn_config_test dlls/wpc/tests wpc_test wine_fn_config_dll wpcap enable_wpcap wine_fn_config_dll ws2_32 enable_ws2_32 implib diff --git a/configure.ac b/configure.ac index 60fc4f8..bc95e88 100644 --- a/configure.ac +++ b/configure.ac @@ -3405,7 +3405,7 @@ WINE_CONFIG_TEST(dlls/wmp/tests) WINE_CONFIG_DLL(wmvcore) WINE_CONFIG_DLL(wnaspi32,,[implib]) WINE_CONFIG_DLL(wow32,enable_win16,[implib]) -WINE_CONFIG_DLL(wpc) +WINE_CONFIG_DLL(wpc,,[clean]) WINE_CONFIG_TEST(dlls/wpc/tests) WINE_CONFIG_DLL(wpcap) WINE_CONFIG_DLL(ws2_32,,[implib]) diff --git a/dlls/wpc/Makefile.in b/dlls/wpc/Makefile.in index edd729f..829a769 100644 --- a/dlls/wpc/Makefile.in +++ b/dlls/wpc/Makefile.in @@ -2,3 +2,5 @@ MODULE = wpc.dll C_SRCS = \ wpc.c + +IDL_SRCS = wpc_classes.idl diff --git a/dlls/wpc/tests/wpc.c b/dlls/wpc/tests/wpc.c index 4d3da36..9fcc3f2 100644 --- a/dlls/wpc/tests/wpc.c +++ b/dlls/wpc/tests/wpc.c @@ -30,9 +30,9 @@ static void test_wpc(void) hres = CoCreateInstance(&CLSID_WindowsParentalControls, NULL, CLSCTX_INPROC_SERVER, &IID_IWindowsParentalControls, (void**)&wpc); if(hres == REGDB_E_CLASSNOTREG) - todo_wine win_skip("CLSID_WindowsParentalControls not registered\n"); + win_skip("CLSID_WindowsParentalControls not registered\n"); else - ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08x\n", hres); + todo_wine ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08x\n", hres); if(FAILED(hres)) return; diff --git a/dlls/wpc/wpc.c b/dlls/wpc/wpc.c index a3e7c03..48f8edf 100644 --- a/dlls/wpc/wpc.c +++ b/dlls/wpc/wpc.c @@ -17,11 +17,14 @@ */ #include "wpcapi.h" +#include "rpcproxy.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wpc); +static HINSTANCE wpc_instance; + /****************************************************************** * DllMain */ @@ -34,6 +37,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInstDLL); + wpc_instance = hInstDLL; break; } @@ -57,3 +61,21 @@ HRESULT WINAPI DllCanUnloadNow(void) TRACE("\n"); return S_FALSE; } + +/*********************************************************************** + * DllRegisterServer (wpc.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + TRACE("()\n"); + return __wine_register_resources(wpc_instance); +} + +/*********************************************************************** + * DllUnregisterServer (wpc.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + TRACE("()\n"); + return __wine_unregister_resources(wpc_instance); +} diff --git a/dlls/wpc/wpc.spec b/dlls/wpc/wpc.spec index 195cf86..fa1c086 100644 --- a/dlls/wpc/wpc.spec +++ b/dlls/wpc/wpc.spec @@ -1,3 +1,5 @@ @ stub ApplyParentalControlsW @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() # not exported by native +@ stdcall -private DllUnregisterServer() # not exported by native diff --git a/dlls/wpc/wpc_classes.idl b/dlls/wpc/wpc_classes.idl new file mode 100644 index 0000000..89406ac --- /dev/null +++ b/dlls/wpc/wpc_classes.idl @@ -0,0 +1,21 @@ +/* + * Copyright 2016 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 + */ + +#pragma makedep register + +#include "wpcapi.idl" diff --git a/include/wpcapi.idl b/include/wpcapi.idl index 097c290..a46a310 100644 --- a/include/wpcapi.idl +++ b/include/wpcapi.idl @@ -19,6 +19,10 @@ import "oaidl.idl"; import "ocidl.idl"; +#ifndef __WIDL__ +#define threading(model) +#endif + typedef [v1_enum] enum tagWPCFLAG_RESTRICTION { WPCFLAG_NO_RESTRICTION = 0x0000, WPCFLAG_LOGGING_REQUIRED = 0x0001, @@ -116,6 +120,8 @@ interface IWindowsParentalControls : IWindowsParentalControlsCore } [ + helpstring("WindowsParentalControls class"), + threading(both), uuid(e77cc89b-7401-4c04-8ced-149db35add04) ] coclass WindowsParentalControls