Commit 5328b9e0 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ntdll: Directly call internal functions from APC handler.

parent 1aa963ef
......@@ -391,6 +391,7 @@ BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
BOOL user_apc = FALSE;
SIZE_T size;
void *addr;
pe_image_info_t image_info;
memset( result, 0, sizeof(*result) );
......@@ -429,10 +430,11 @@ BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
size = call->virtual_alloc.size;
if ((ULONG_PTR)addr == call->virtual_alloc.addr && size == call->virtual_alloc.size)
{
result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr,
call->virtual_alloc.zero_bits, &size,
call->virtual_alloc.op_type,
call->virtual_alloc.prot );
result->virtual_alloc.status = virtual_alloc_aligned( &addr,
call->virtual_alloc.zero_bits, &size,
call->virtual_alloc.op_type,
call->virtual_alloc.prot,
0 );
result->virtual_alloc.addr = wine_server_client_ptr( addr );
result->virtual_alloc.size = size;
}
......@@ -534,11 +536,12 @@ BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
{
LARGE_INTEGER offset;
offset.QuadPart = call->map_view.offset;
result->map_view.status = NtMapViewOfSection( wine_server_ptr_handle(call->map_view.handle),
NtCurrentProcess(), &addr,
call->map_view.zero_bits, 0,
&offset, &size, ViewShare,
call->map_view.alloc_type, call->map_view.prot );
result->map_view.status = virtual_map_section( wine_server_ptr_handle(call->map_view.handle),
&addr,
call->map_view.zero_bits, 0,
&offset, &size,
call->map_view.alloc_type, call->map_view.prot,
&image_info );
result->map_view.addr = wine_server_client_ptr( addr );
result->map_view.size = size;
}
......
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