Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
826 views
in Technique[技术] by (71.8m points)

winapi - Is there a Windows API call that will tell me if I'm running on a 64-bit OS?

Is there a Windows API call that will tell me if I'm running on a 64-bit OS? I have some legacy c++ code that makes a call to GetVersionEx to fill in a OSVERSIONINFO structure, but that only tells me (AFAIK) the OS (Vista, V7, etc.), but not the processing architecture. I can hack around this by simply looking for the existence of "C:Program Files (x86)...", but this seems ugly. I'm sure there must be an API to return this info.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

IsWow64Process might be what you are looking for.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...