From 99f3a924dc2769b084e371f4767e35cda1b30aa7 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 30 Apr 2000 12:11:12 +0000 Subject: [PATCH] Use Thread pseudo handle and not Thread Id as argument for the call to GetThreadSelectorEntry. --- relay32/wowthunk.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/relay32/wowthunk.c b/relay32/wowthunk.c index 41760af02ee..c0e14414982 100644 --- a/relay32/wowthunk.c +++ b/relay32/wowthunk.c @@ -25,7 +25,7 @@ DEFAULT_DEBUG_CHANNEL(thunk) */ BOOL WINAPI WOWGetDescriptor( SEGPTR segptr, LPLDT_ENTRY ldtent ) { - return GetThreadSelectorEntry( GetCurrentThreadId(), + return GetThreadSelectorEntry( GetCurrentThread(), segptr >> 16, ldtent ); } @@ -345,8 +345,8 @@ static DWORD WOW_CallProc32W16( BOOL Ex ) argconvmask = VA_ARG16( valist, DWORD ); proc32 = VA_ARG16( valist, FARPROC ); TRACE("(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex); - args = (DWORD*)HEAP_xalloc( GetProcessHeap(), 0, - sizeof(DWORD)*nrofargs ); + args = (DWORD*)HeapAlloc( GetProcessHeap(), 0, sizeof(DWORD)*nrofargs ); + if(args == NULL) proc32 = NULL; /* maybe we should WARN here? */ /* CallProcEx doesn't need its args reversed */ for (i=0;i