What are these : DWORD and there is another one? Are they typedefs?
Printable View
What are these : DWORD and there is another one? Are they typedefs?
Yes. They're only defined when you include <windows.h> so they're not really the best thing to use.
DWORD == unsigned long
WORD == unsigned int
From this, it's obvious that they're the same size :rolleyes: A bit pointless, really.
I am not sure if long and int are machine dependant.
But usually the unsigned long is Double the Word size of the machine.
BUT When We say DWORD and WORD they are definitely
Machine dependant (ie..Size varies for 16-bit,32-bit or 64 bit Computer")
The only machine-dependent type is int, and as a by-product I think that changes bool and enum. Not sure though.
So if you compiled on a SPARC you'd have a 128 bit int and a 32-bit long?
Apparently that's what happens, according to the standard...bizarre I know :confused:
Maybe you have sized types on a SPARC compiler...Sun tend to prefer doing that rather than breaking existing code.
Quote:
Originally posted by HarryW
So if you compiled on a SPARC you'd have a 128 bit int and a 32-bit long?
As per an article(in Paper..Don't ask me what it's dated. :confused: ) I read that
short int cannot be greater than int
and int cannot be greater than Long int.
Pure logic! :DQuote:
Originally posted by Active:
short int cannot be greater than int
and int cannot be greater than Long int.
I saw the DWORD and WORD in a directx example.