ole32: Rename a helper to reflect its purpose better.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0430efb4a6
commit
bc5e9207d9
|
@ -1406,12 +1406,8 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/* Returns expanded dll path from the registry or activation context. */
|
||||||
* COM_RegReadPath [internal]
|
static BOOL get_object_dll_path(const struct class_reg_data *regdata, WCHAR *dst, DWORD dstlen)
|
||||||
*
|
|
||||||
* Reads a registry value and expands it when necessary
|
|
||||||
*/
|
|
||||||
static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, DWORD dstlen)
|
|
||||||
{
|
{
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
|
@ -1438,7 +1434,7 @@ static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, D
|
||||||
lstrcpynW(dst, src, dstlen);
|
lstrcpynW(dst, src, dstlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return !ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1451,7 +1447,7 @@ static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, D
|
||||||
ActivateActCtx(regdata->u.actctx.hactctx, &cookie);
|
ActivateActCtx(regdata->u.actctx.hactctx, &cookie);
|
||||||
ret = SearchPathW(NULL, nameW, dllW, dstlen, dst, NULL);
|
ret = SearchPathW(NULL, nameW, dllW, dstlen, dst, NULL);
|
||||||
DeactivateActCtx(0, cookie);
|
DeactivateActCtx(0, cookie);
|
||||||
return !*dst;
|
return *dst != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1476,7 +1472,7 @@ static HRESULT apartment_hostobject(struct apartment *apt,
|
||||||
|
|
||||||
TRACE("clsid %s, iid %s\n", debugstr_guid(¶ms->clsid), debugstr_guid(¶ms->iid));
|
TRACE("clsid %s, iid %s\n", debugstr_guid(¶ms->clsid), debugstr_guid(¶ms->iid));
|
||||||
|
|
||||||
if (COM_RegReadPath(¶ms->regdata, dllpath, ARRAY_SIZE(dllpath)) != ERROR_SUCCESS)
|
if (!get_object_dll_path(¶ms->regdata, dllpath, ARRAY_SIZE(dllpath)))
|
||||||
{
|
{
|
||||||
/* failure: CLSID is not found in registry */
|
/* failure: CLSID is not found in registry */
|
||||||
WARN("class %s not registered inproc\n", debugstr_guid(¶ms->clsid));
|
WARN("class %s not registered inproc\n", debugstr_guid(¶ms->clsid));
|
||||||
|
@ -2970,7 +2966,7 @@ static HRESULT get_inproc_class_object(APARTMENT *apt, const struct class_reg_da
|
||||||
else
|
else
|
||||||
apartment_threaded = !apt->multi_threaded;
|
apartment_threaded = !apt->multi_threaded;
|
||||||
|
|
||||||
if (COM_RegReadPath(regdata, dllpath, ARRAY_SIZE(dllpath)) != ERROR_SUCCESS)
|
if (!get_object_dll_path(regdata, dllpath, ARRAY_SIZE(dllpath)))
|
||||||
{
|
{
|
||||||
/* failure: CLSID is not found in registry */
|
/* failure: CLSID is not found in registry */
|
||||||
WARN("class %s not registered inproc\n", debugstr_guid(rclsid));
|
WARN("class %s not registered inproc\n", debugstr_guid(rclsid));
|
||||||
|
@ -5086,7 +5082,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
regdata.u.hkey = hkey;
|
regdata.u.hkey = hkey;
|
||||||
regdata.hkey = TRUE;
|
regdata.hkey = TRUE;
|
||||||
|
|
||||||
if (COM_RegReadPath(®data, dllpath, ARRAY_SIZE(dllpath)) == ERROR_SUCCESS)
|
if (get_object_dll_path(®data, dllpath, ARRAY_SIZE(dllpath)))
|
||||||
{
|
{
|
||||||
static const WCHAR wszOle32[] = {'o','l','e','3','2','.','d','l','l',0};
|
static const WCHAR wszOle32[] = {'o','l','e','3','2','.','d','l','l',0};
|
||||||
if (!strcmpiW(dllpath, wszOle32))
|
if (!strcmpiW(dllpath, wszOle32))
|
||||||
|
|
Loading…
Reference in New Issue