Commit d066a9a0 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Make the mapping base address a client_ptr_t instead of a void pointer.

parent 8e9c156e
......@@ -2285,11 +2285,12 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
req->access = access;
res = wine_server_call( req );
map_vprot = reply->protect;
base = reply->base;
base = wine_server_get_ptr( reply->base );
full_size = reply->size;
header_size = reply->header_size;
dup_mapping = wine_server_ptr_handle( reply->mapping );
shared_file = wine_server_ptr_handle( reply->shared_file );
if ((ULONG_PTR)base != reply->base) base = NULL;
}
SERVER_END_REQ;
if (res) return res;
......
......@@ -1737,7 +1737,7 @@ struct get_mapping_info_reply
mem_size_t size;
int protect;
int header_size;
void* base;
client_ptr_t base;
obj_handle_t mapping;
obj_handle_t shared_file;
};
......@@ -5052,6 +5052,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 365
#define SERVER_PROTOCOL_VERSION 366
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -58,7 +58,7 @@ struct mapping
int protect; /* protection flags */
struct file *file; /* file mapped */
int header_size; /* size of headers (for PE image mapping) */
void *base; /* default base addr (for PE image mapping) */
client_ptr_t base; /* default base addr (for PE image mapping) */
struct ranges *committed; /* list of committed ranges in this mapping */
struct file *shared_file; /* temp file for shared PE mapping */
struct list shared_entry; /* entry in global shared PE mappings list */
......@@ -341,7 +341,7 @@ static int get_image_params( struct mapping *mapping )
if (mapping->shared_file) list_add_head( &shared_list, &mapping->shared_entry );
mapping->size = ROUND_SIZE( nt.OptionalHeader.SizeOfImage );
mapping->base = (void *)nt.OptionalHeader.ImageBase;
mapping->base = nt.OptionalHeader.ImageBase;
mapping->header_size = max( pos + size, nt.OptionalHeader.SizeOfHeaders );
mapping->protect = VPROT_IMAGE;
......@@ -389,7 +389,7 @@ static struct object *create_mapping( struct directory *root, const struct unico
DACL_SECURITY_INFORMATION|
SACL_SECURITY_INFORMATION );
mapping->header_size = 0;
mapping->base = NULL;
mapping->base = 0;
mapping->file = NULL;
mapping->shared_file = NULL;
mapping->committed = NULL;
......@@ -453,11 +453,11 @@ static void mapping_dump( struct object *obj, int verbose )
{
struct mapping *mapping = (struct mapping *)obj;
assert( obj->ops == &mapping_ops );
fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%p "
fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%08lx "
"shared_file=%p ",
(unsigned int)(mapping->size >> 32), (unsigned int)mapping->size,
mapping->protect, mapping->file, mapping->header_size,
mapping->base, mapping->shared_file );
(unsigned long)mapping->base, mapping->shared_file );
dump_object_name( &mapping->obj );
fputc( '\n', stderr );
}
......
......@@ -1369,7 +1369,7 @@ enum char_info_mode
mem_size_t size; /* mapping size */
int protect; /* protection flags */
int header_size; /* header size (for VPROT_IMAGE mapping) */
void* base; /* default base addr (for VPROT_IMAGE mapping) */
client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
obj_handle_t mapping; /* duplicate mapping handle unless removable */
obj_handle_t shared_file; /* shared mapping file handle */
@END
......
......@@ -1813,7 +1813,9 @@ static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *re
fprintf( stderr, "," );
fprintf( stderr, " protect=%d,", req->protect );
fprintf( stderr, " header_size=%d,", req->header_size );
fprintf( stderr, " base=%p,", req->base );
fprintf( stderr, " base=" );
dump_uint64( &req->base );
fprintf( stderr, "," );
fprintf( stderr, " mapping=%04x,", req->mapping );
fprintf( stderr, " shared_file=%04x", req->shared_file );
}
......
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