Commit c0be1ec8 authored by Alexandre Julliard's avatar Alexandre Julliard

hnetcfg: Convert dll registration to the IRegistrar mechanism.

parent 71dbeb2e
......@@ -8,7 +8,8 @@ C_SRCS = \
policy.c \
port.c \
profile.c \
regsvr.c \
service.c
IDL_R_SRCS = hnetcfg.idl
@MAKE_DLL_RULES@
......@@ -23,6 +23,7 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "netfw.h"
#include "wine/debug.h"
......@@ -30,6 +31,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
static HINSTANCE instance;
typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj );
typedef struct
......@@ -118,6 +121,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_WINE_PREATTACH:
return FALSE;
case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
......@@ -149,3 +153,19 @@ HRESULT WINAPI DllCanUnloadNow( void )
{
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (HNETCFG.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (HNETCFG.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/*
* COM Classes for hnetcfg
*
* Copyright 2010 Alexandre Julliard
*
* 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
*/
[
helpstring("HNetCfg.FwMgr"),
progid("HNetCfg.FwMgr"),
threading(both),
uuid(304ce942-6e39-40d8-943a-b913c40c9cd4)
]
coclass NetFwMgr { interface INetFwMgr; }
[
helpstring("HNetCfg.FwAuthorizedApplication"),
progid("HNetCfg.FwAuthorizedApplication"),
threading(both),
uuid(ec9846b3-2762-4a6b-a214-6acb603462d2)
]
coclass NetFwAuthorizedApplication { interface INetFwAuthorizedApplications; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment