On Mon Jun 9 09:09:10 2025 +0000, Nikolay Sivov wrote:
This doesn't look right. Why would it use NO_ADDREF? I think you only need QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX.
This has the same behavior as using QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX. I will use QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX instead.
``` /* find the appropriate activation context for RtlQueryInformationActivationContext */ static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags, ULONG class ) { NTSTATUS status = STATUS_SUCCESS;
if (flags & QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX) { if (*handle) return STATUS_INVALID_PARAMETER;
*handle = get_current_actctx_no_addref(); } ```