Commit feab43c7 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

inseng: Switch to the standard regsvr.c registration code.

Now the CLSID_DLManager and CLSID_ActiveSetupEng keys get proper display names. This also gives us DllUnregisterServer() for free.
parent b684e9d6
......@@ -8,7 +8,8 @@ EXTRALIBS = -luuid
EXTRADEFS = -DCOM_NO_WINDOWS_H
C_SRCS = \
inseng_main.c
inseng_main.c \
regsvr.c
@MAKE_DLL_RULES@
......
......@@ -5,7 +5,7 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stub DllInstall
@ stdcall -private DllRegisterServer()
#@ stdcall -private DllUnregisterServer()
@ stdcall -private DllUnregisterServer()
@ stub DownloadFile
@ stub GetICifFileFromFile
@ stub GetICifRWFileFromFile
......
......@@ -35,9 +35,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(inseng);
DEFINE_GUID(CLSID_DLManager, 0xBFC880F1,0x7484,0x11D0,0x83,0x09,0x00,0xAA,0x00,0xB6,0x01,0x5C);
DEFINE_GUID(CLSID_ActiveSetupEng, 0x6e449686,0xc509,0x11cf,0xaa,0xfa,0x00,0xaa,0x00,0xb6,0x01,0x5c );
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason)
......@@ -66,47 +63,6 @@ HRESULT WINAPI DllCanUnloadNow(void)
return S_FALSE;
}
static HRESULT register_clsid(LPCGUID guid)
{
static const WCHAR clsid[] =
{'C','L','S','I','D','\\',0};
static const WCHAR ips[] =
{'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
static const WCHAR inseng[] =
{'i','n','s','e','n','g','.','d','l','l',0};
static const WCHAR threading_model[] =
{'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
static const WCHAR apartment[] =
{'A','p','a','r','t','m','e','n','t',0};
WCHAR path[80];
HKEY key = NULL;
LONG r;
lstrcpyW(path, clsid);
StringFromGUID2(guid, &path[6], 80);
lstrcatW(path, ips);
r = RegCreateKeyW(HKEY_CLASSES_ROOT, path, &key);
if (r != ERROR_SUCCESS)
return E_FAIL;
RegSetValueExW(key, NULL, 0, REG_SZ, (LPBYTE)inseng, sizeof inseng);
RegSetValueExW(key, threading_model, 0, REG_SZ, (LPBYTE)apartment, sizeof apartment);
RegCloseKey(key);
return S_OK;
}
HRESULT WINAPI DllRegisterServer(void)
{
HRESULT r;
r = register_clsid(&CLSID_ActiveSetupEng);
if (SUCCEEDED(r))
r = register_clsid(&CLSID_DLManager);
return r;
}
BOOL WINAPI CheckTrustEx( LPVOID a, LPVOID b, LPVOID c, LPVOID d, LPVOID e )
{
FIXME("%p %p %p %p %p\n", a, b, c, d, e );
......
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