判断当前win32程序是否在windows 64位环境下运行
bool fnis_wow64_process(void)
{
int bIsWow64 = 0;
typedef int (__stdcall *PFN_ISWOW64PROCESS)(void *,int *);
PFN_ISWOW64PROCESS fnIsWow64Process = (PFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle("kernel32"),"IsWow64Process");
if (fnIsWow64Process != NULL)
if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
if(bIsWow64)
return true;
return false;
}