PDA

View Full Version : سوال: ارور در تابع Cpuid



amir-aa
دوشنبه 30 تیر 1393, 19:34 عصر
با سلام
من از تابع cpuid به شکل زیر استفاده کردم


int CPUInfo[4] = {-1};
unsigned nExIds, i = 0;
char CPUBrandString[0x40];

// Get the information associated with each extended ID.
__cpuid(CPUInfo, 0x80000000);
nExIds = CPUInfo[0];
for (i=0x80000000; i<=nExIds; ++i)
{
__cpuid(CPUInfo, i);
// Interpret CPU brand string
if (i == 0x80000002)
memcpy(CPUBrandString, CPUInfo, sizeof(CPUInfo));
else if (i == 0x80000003)
memcpy(CPUBrandString + 16, CPUInfo, sizeof(CPUInfo));
else if (i == 0x80000004)
memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo));
}



اما چرا این تابع ارور میده؟؟!

C3861: '__cpuid': identifier not found

البته در حالت کنسول کار میکنه اما در حالت ویژوال ارور میده!!!!

omid_kma
جمعه 03 مرداد 1393, 02:13 صبح
intrin.h رو include کردین ؟