sync find_query_actctx with wine 1.1.40

svn path=/trunk/; revision=45945
This commit is contained in:
Christoph von Wittich 2010-03-06 14:29:56 +00:00
parent 002ea545f9
commit 8592512f2f

View file

@ -2096,6 +2096,8 @@ static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags, ULONG class )
if (flags & QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX)
{
if (*handle) return STATUS_INVALID_PARAMETER;
if (NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame)
*handle = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame->ActivationContext;
}
@ -2104,6 +2106,8 @@ static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags, ULONG class )
ULONG magic;
LDR_DATA_TABLE_ENTRY *pldr;
if (!*handle) return STATUS_INVALID_PARAMETER;
LdrLockLoaderLock( 0, NULL, &magic );
if (!LdrFindEntryForAddress( *handle, &pldr ))
{