Commit b23b4f5d authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

hlink: Implement DllRegisterServer.

parent 58709d22
...@@ -29,5 +29,5 @@ ...@@ -29,5 +29,5 @@
@ stdcall -private DllCanUnloadNow() @ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stub -private DllRegisterServer @ stdcall -private DllRegisterServer()
@ stub -private DllUnregisterServer # @ stub -private DllUnregisterServer
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "winreg.h"
#include "ole2.h" #include "ole2.h"
#include "unknwn.h" #include "unknwn.h"
...@@ -312,3 +313,44 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) ...@@ -312,3 +313,44 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return IClassFactory_QueryInterface(pcf, iid, ppv); return IClassFactory_QueryInterface(pcf, iid, ppv);
} }
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 hlink[] =
{'h','l','i','n','k','.','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)hlink, sizeof hlink);
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_StdHlink);
if (SUCCEEDED(r))
r = register_clsid(&CLSID_StdHlinkBrowseContext);
return S_OK;
}
...@@ -2091,6 +2091,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" ...@@ -2091,6 +2091,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,dswave.dll,1 11,,dswave.dll,1
11,,dxdiagn.dll,1 11,,dxdiagn.dll,1
11,,hhctrl.ocx,1 11,,hhctrl.ocx,1
11,,hlink.dll,1
11,,itss.dll,1 11,,itss.dll,1
11,,mlang.dll,1 11,,mlang.dll,1
11,,mshtml.dll,1 11,,mshtml.dll,1
......
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