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 = \ ...@@ -8,7 +8,8 @@ C_SRCS = \
policy.c \ policy.c \
port.c \ port.c \
profile.c \ profile.c \
regsvr.c \
service.c service.c
IDL_R_SRCS = hnetcfg.idl
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "objbase.h" #include "objbase.h"
#include "rpcproxy.h"
#include "netfw.h" #include "netfw.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -30,6 +31,8 @@ ...@@ -30,6 +31,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
static HINSTANCE instance;
typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj );
typedef struct typedef struct
...@@ -118,6 +121,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -118,6 +121,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_WINE_PREATTACH: case DLL_WINE_PREATTACH:
return FALSE; return FALSE;
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL); DisableThreadLibraryCalls(hInstDLL);
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
...@@ -149,3 +153,19 @@ HRESULT WINAPI DllCanUnloadNow( void ) ...@@ -149,3 +153,19 @@ HRESULT WINAPI DllCanUnloadNow( void )
{ {
return S_FALSE; 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