mfc 判断是否位64位系统

#include <windows.h>
typedef BOOL(WINAPI* LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);

LPFN_ISWOW64PROCESS
fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(
	GetModuleHandle("kernel32"), "IsWow64Process");
BOOL IsWow64()
{
	BOOL bIsWow64 = FALSE;

	if (NULL != fnIsWow64Process)
	{
		if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
		{
			// handle error
		}
	}
	return bIsWow64;
}

posted @ 2021-06-18 16:38  Hey,Coder!  阅读(162)  评论(0编辑  收藏  举报