I’m trying to determine if the current system is 32 or 64 bit. And I want to get that info from the SystemInfo, but it VS gives me error’s when I try to compile this. I can’t use most other methods to determine if the OS is 64 or 32 bit. Because I need to check if windows is 64 bit and not the process.
LPSYSTEM_INFO info;
GetSystemInfo(&info); // Error
IntelliSense: argument of type “LPSYSTEM_INFO *” is incompatible with parameter of type “LPSYSTEM_INFO”
error C2664: ‘GetSystemInfo’ : cannot convert parameter 1 from ‘LPSYSTEM_INFO *’ to ‘LPSYSTEM_INFO’
Your
infobuffer should be of typeSYSTEM_INFO, notLPSYSTEM_INFO. When you capture its address with&infoyou’ll get theLPSYSTEM_INFOpointer you need to pass intoGetSystemInfo.(In case it’s not clear
LPSYSTEM_INFOis a typedef, aliased toSYSTEM_INFO *.)