Commit c7ba8b7a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

sxs: Query context that contains the GUID in SxsLookupClrGuid().

This restores pre-2cfc85dc logic; activation/deactivation still happens, and user context in this case is returned from FindActCtxSectionGuid(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50139Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 43a5234b
......@@ -135,14 +135,20 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
if (flags & SXS_LOOKUP_CLR_GUID_FIND_SURROGATE)
{
if ((retval = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES, clsid, &guid_info)))
if ((retval = FindActCtxSectionGuid(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES, clsid, &guid_info)))
{
flags &= ~SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS;
}
}
if (!retval && (flags & SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS))
{
if ((retval = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, clsid, &guid_info)))
if ((retval = FindActCtxSectionGuid(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, clsid, &guid_info)))
{
flags &= ~SXS_LOOKUP_CLR_GUID_FIND_SURROGATE;
}
}
if (!retval)
......@@ -151,7 +157,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
goto out;
}
retval = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, &guid_info.ulAssemblyRosterIndex,
retval = QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex,
AssemblyDetailedInformationInActivationContext, NULL, 0, &bytes_assembly_info);
if (!retval && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
......@@ -159,7 +165,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
}
assembly_info = heap_alloc(bytes_assembly_info);
if (!(retval = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, &guid_info.ulAssemblyRosterIndex,
if (!(retval = QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex,
AssemblyDetailedInformationInActivationContext, assembly_info,
bytes_assembly_info, &bytes_assembly_info)))
{
......@@ -225,6 +231,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
SetLastError(0);
out:
ReleaseActCtx(guid_info.hActCtx);
if (flags & SXS_LOOKUP_CLR_GUID_USE_ACTCTX)
DeactivateActCtx(0, cookie);
......
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