Commit dc36d92e authored by Alexandre Julliard's avatar Alexandre Julliard

wmiutils: Convert dll registration to the IRegistrar mechanism.

parent aece1f73
......@@ -3,7 +3,8 @@ IMPORTS = oleaut32 ole32 advapi32
C_SRCS = \
main.c \
regsvr.c \
statuscode.c
IDL_R_SRCS = wmiutils.idl
@MAKE_DLL_RULES@
......@@ -26,12 +26,15 @@
#include "winuser.h"
#include "objbase.h"
#include "wbemcli.h"
#include "rpcproxy.h"
#include "wine/debug.h"
#include "wmiutils_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmiutils);
static HINSTANCE instance;
typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj );
typedef struct
......@@ -118,6 +121,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
instance = hinst;
DisableThreadLibraryCalls( hinst );
break;
case DLL_PROCESS_DETACH:
......@@ -140,7 +144,26 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
return IClassFactory_QueryInterface( cf, iid, ppv );
}
/***********************************************************************
* DllCanUnloadNow (WMIUTILS.@)
*/
HRESULT WINAPI DllCanUnloadNow( void )
{
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (WMIUTILS.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (WMIUTILS.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/*
* COM Classes for wmiutils
*
* 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
*/
[
threading(both),
uuid(eb87e1bd-3233-11d2-aec9-00c04fb68820)
]
coclass WbemStatusCode { interface IWbemStatusCodeText; }
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