Commit 822d7b6e authored by Alexandre Julliard's avatar Alexandre Julliard

wbemprox: Convert dll registration to the IRegistrar mechanism.

parent dc36d92e
...@@ -3,7 +3,8 @@ IMPORTS = ole32 advapi32 ...@@ -3,7 +3,8 @@ IMPORTS = ole32 advapi32
C_SRCS = \ C_SRCS = \
main.c \ main.c \
regsvr.c \
wbemlocator.c wbemlocator.c
IDL_R_SRCS = wbemprox.idl
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
...@@ -27,12 +27,15 @@ ...@@ -27,12 +27,15 @@
#include "winbase.h" #include "winbase.h"
#include "objbase.h" #include "objbase.h"
#include "wbemcli.h" #include "wbemcli.h"
#include "rpcproxy.h"
#include "wbemprox_private.h" #include "wbemprox_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wbemprox); WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
static HINSTANCE instance;
typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj );
typedef struct typedef struct
...@@ -120,6 +123,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -120,6 +123,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_WINE_PREATTACH: case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
...@@ -143,7 +147,26 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) ...@@ -143,7 +147,26 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
return IClassFactory_QueryInterface( cf, iid, ppv ); return IClassFactory_QueryInterface( cf, iid, ppv );
} }
/***********************************************************************
* DllCanUnloadNow (WBEMPROX.@)
*/
HRESULT WINAPI DllCanUnloadNow( void ) HRESULT WINAPI DllCanUnloadNow( void )
{ {
return S_FALSE; return S_FALSE;
} }
/***********************************************************************
* DllRegisterServer (WBEMPROX.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (WBEMPROX.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/*
* COM Classes for wbemprox
*
* 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("WBEM Locator"),
threading(both),
uuid(4590f811-1d3a-11d0-891f-00aa004b2e24)
]
coclass WbemLocator { interface IWbemLocator; }
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