server: Make the mapping base address a client_ptr_t instead of a void pointer.
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 5b3ca77..7d57af9 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -2285,11 +2285,12 @@
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;
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index bc9ea96..434d52a 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1737,7 +1737,7 @@
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 @@
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 */
diff --git a/server/mapping.c b/server/mapping.c
index 0982b86..81c5096 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -58,7 +58,7 @@
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 @@
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 @@
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 @@
{
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 );
}
diff --git a/server/protocol.def b/server/protocol.def
index 962446a..25dc626 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1369,7 +1369,7 @@
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
diff --git a/server/trace.c b/server/trace.c
index 391f65c..fb8c867 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1813,7 +1813,9 @@
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 );
}