Commit 69f58161 authored by Alexandre Julliard's avatar Alexandre Julliard

wuapi: Convert dll registration to the IRegistrar mechanism.

parent 2f0371e8
......@@ -6,12 +6,12 @@ C_SRCS = \
downloader.c \
installer.c \
main.c \
regsvr.c \
searcher.c \
session.c \
updates.c
IDL_TLB_SRCS = wuapi_tlb.idl
IDL_R_SRCS = wuapi_tlb.idl
RC_SRCS = rsrc.rc
......
......@@ -27,6 +27,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "wuapi.h"
#include "wine/debug.h"
......@@ -114,6 +115,8 @@ static const struct IClassFactoryVtbl wucf_vtbl =
static wucf sessioncf = { &wucf_vtbl, UpdateSession_create };
static wucf updatescf = { &wucf_vtbl, AutomaticUpdates_create };
static HINSTANCE instance;
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
{
switch(reason)
......@@ -121,6 +124,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:
......@@ -151,3 +155,19 @@ HRESULT WINAPI DllCanUnloadNow( void )
{
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (WUAPI.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (WUAPI.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
......@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
cpp_quote("DEFINE_GUID(CLSID_AutomaticUpdates, 0xbfe18e9c,0x6d87,0x4450,0xb3,0x7c,0xe0,0x2f,0x0b,0x37,0x38,0x03);")
cpp_quote("DEFINE_GUID(CLSID_UpdateSession, 0x4cb43d7f,0x7eee,0x4906,0x86,0x98,0x60,0xda,0x1c,0x38,0xf2,0xfe);")
import "oaidl.idl";
[
......@@ -1297,4 +1294,22 @@ interface IUpdateInstaller : IDispatch
[out, retval] VARIANT_BOOL *retval);
}
[
helpstring("AutomaticUpdates Class"),
threading(both),
progid("Microsoft.Update.AutoUpdate.1"),
vi_progid("Microsoft.Update.AutoUpdate"),
uuid(bfe18e9c-6d87-4450-b37c-e02f0b373803)
]
coclass AutomaticUpdates { interface IAutomaticUpdates; }
[
helpstring("UpdateSession Class"),
threading(both),
progid("Microsoft.Update.Session.1"),
vi_progid("Microsoft.Update.Session"),
uuid(4cb43d7f-7eee-4906-8698-60da1c38f2fe)
]
coclass UpdateSession { interface IUpdateSession; }
} /* WUApiLib */
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