sxs: Query context that contains the GUID in SxsLookupClrGuid().
This restores pre-2cfc85dc55d403a7fcb885a62bb28f8d73498c2d 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=50139 Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
43a5234bd9
commit
c7ba8b7aa4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue