D
dis
I've been going through my code and clearing away some of the compiler
warnings that i'm generating and i've come across areas where i cast
pointers to integer values. The Visual Studio compiler generates this
warning ...
"warning C4311: 'type cast' : pointer truncation from 'void *' to
'DWORD'"
The warning is generated as the pointer is apparently 64 bits long
(even though a quick sizeof() reports it to only be 4 bytes in length)
and is being truncated, i understand that much. Looking around the
MSDN revealed that the pointer is considered a 32 bit offset from a 32
bit base pointer, and i assume thats where the full 64 bits has come
from.
What i don't understand is why sizeof() reports the pointer as 32 bits
while it is considered to be 64 bits in lenght when casting. Also
i've got no idea how to change the code so that the warning will go
away, anyone?
warnings that i'm generating and i've come across areas where i cast
pointers to integer values. The Visual Studio compiler generates this
warning ...
"warning C4311: 'type cast' : pointer truncation from 'void *' to
'DWORD'"
The warning is generated as the pointer is apparently 64 bits long
(even though a quick sizeof() reports it to only be 4 bytes in length)
and is being truncated, i understand that much. Looking around the
MSDN revealed that the pointer is considered a 32 bit offset from a 32
bit base pointer, and i assume thats where the full 64 bits has come
from.
What i don't understand is why sizeof() reports the pointer as 32 bits
while it is considered to be 64 bits in lenght when casting. Also
i've got no idea how to change the code so that the warning will go
away, anyone?