64bit driver driver with 32 bit long
berryja at gmail.com
Mon Apr 4 21:27:08 UTC 2005
On Apr 4, 2005 1:04 PM, Tawade, Prashant <prashant.tawade at intel.com> wrote:
> Does anyone know how to build a 64 bit driver with "32 bit unsigned long",
> as is in the case of windows 64 bit drivers ?
What exactly do you mean? With a 64-bit compile, an unsigned long
variable is going to be 64-bits wide. As far as I know, there is no
way to change that. sizeof(long) == sizeof(void *) has to be true.
To use a 32-bit wide (unsigned) variable, use the unsigned int type.
typedef unsigned int u32type;
"u32type" can be whatever you want to call your unsigned 32-bit data
type. If this code has to work for both 32- and 64-bit environments,
then you should use some #if statements to determine which typedef to
use. Is this what you wanted to know, or are you asking something
More information about the users