wpc: Register WindowsParentalControls class.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-08-22 16:52:54 +02:00 committed by Alexandre Julliard
parent 72824494e2
commit 0cb7301aec
8 changed files with 57 additions and 4 deletions

2
configure vendored
View File

@ -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

View File

@ -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])

View File

@ -2,3 +2,5 @@ MODULE = wpc.dll
C_SRCS = \
wpc.c
IDL_SRCS = wpc_classes.idl

View File

@ -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;

View File

@ -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);
}

View File

@ -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

21
dlls/wpc/wpc_classes.idl Normal file
View File

@ -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"

View File

@ -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