and also a 32bit OS from a 64bit OS?
Are there some #ifdef I can use to detect the actual OS version and whether it is 32 or 64 bit?
and also a 32bit OS from a 64bit OS? Are there some #ifdef I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
At compile time you can use the
WINVER&_WIN64macro’s, though this info is for the OS(es) being targeted, not the OS being compiled on.At runtime you can use
GetVersionExto get OS version info andIsWOW64Processto determine if you are running on 64 or 32 bit.