Click here to Skip to main content
15,922,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC System Information Pin
David Crow11-Apr-05 2:52
David Crow11-Apr-05 2:52 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 3:53
charu12311-Apr-05 3:53 
GeneralRe: MFC System Information Pin
ThatsAlok8-Apr-05 18:25
ThatsAlok8-Apr-05 18:25 
GeneralRe: MFC System Information Pin
David Crow8-Apr-05 5:07
David Crow8-Apr-05 5:07 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 0:07
charu12311-Apr-05 0:07 
GeneralRe: MFC System Information Pin
David Crow11-Apr-05 2:28
David Crow11-Apr-05 2:28 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 0:47
charu12311-Apr-05 0:47 
GeneralRe: MFC System Information Pin
David Crow11-Apr-05 2:42
David Crow11-Apr-05 2:42 
charu123 wrote:
I am not able to implement GetAdaptersInfo becoz it is not recognizing some header files.

This makes no sense. Functions do not have the ability or capacity to recognize anything compiler-related. Perhaps you meant that the compiler is unable to locate a particular header file.

charu123 wrote:
Can u tell me how to get CPU speed.

There are several ways of doing this, some better than others.

Here is a Delphi example (it's a trivial exercise to convert to C). You can also look in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0. I'ved used the following before:

unsigned __int64 start, stop;
unsigned __int64 nCtr, nFreq, nCtrStop; 
QueryPerformanceFrequency((LARGE_INTEGER *) &nFreq);
 
_asm _emit 0x0F
_asm _emit 0x31
_asm mov DWORD PTR start, eax
_asm mov DWORD PTR [start + 4], edx
 
QueryPerformanceCounter((LARGE_INTEGER *) &nCtrStop);
 
nCtrStop += nFreq;
     
do
{
    QueryPerformanceCounter((LARGE_INTEGER *) &nCtr);
} while (nCtr < nCtrStop);
 
_asm _emit 0x0F
_asm _emit 0x31
_asm mov DWORD PTR stop, eax
_asm mov DWORD PTR [stop + 4], edx
 
// stop-start is speed in Hz
// divided by 1,000,000 is speed in MHz



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: MFC System Information Pin
charu12311-Apr-05 17:42
charu12311-Apr-05 17:42 
GeneralRe: MFC System Information Pin
charu12312-Apr-05 0:42
charu12312-Apr-05 0:42 
GeneralRe: MFC System Information Pin
David Crow12-Apr-05 2:53
David Crow12-Apr-05 2:53 
GeneralExceptions Pin
Monty27-Apr-05 20:08
Monty27-Apr-05 20:08 
GeneralRe: Exceptions Pin
Michael Dunn7-Apr-05 20:32
sitebuilderMichael Dunn7-Apr-05 20:32 
GeneralRe: Exceptions Pin
Monty27-Apr-05 20:47
Monty27-Apr-05 20:47 
GeneralRe: Exceptions Pin
Cedric Moonen7-Apr-05 22:42
Cedric Moonen7-Apr-05 22:42 
GeneralRe: Exceptions Pin
toxcct8-Apr-05 0:32
toxcct8-Apr-05 0:32 
GeneralRe: Exceptions Pin
Cedric Moonen8-Apr-05 0:45
Cedric Moonen8-Apr-05 0:45 
GeneralRe: Exceptions Pin
Kevin McFarlane7-Apr-05 23:28
Kevin McFarlane7-Apr-05 23:28 
GeneralRe: Exceptions Pin
Tim Smith8-Apr-05 4:24
Tim Smith8-Apr-05 4:24 
GeneralRe: Exceptions Pin
Kevin McFarlane8-Apr-05 8:00
Kevin McFarlane8-Apr-05 8:00 
QuestionHow to write a COM object with VC6, which can be refered in C# .NET prj? Pin
wangdave7-Apr-05 19:38
wangdave7-Apr-05 19:38 
AnswerRe: How to write a COM object with VC6, which can be refered in C# .NET prj? Pin
ThatsAlok7-Apr-05 20:02
ThatsAlok7-Apr-05 20:02 
GeneralRe: How to write a COM object with VC6, which can be refered in C# .NET prj? Pin
Anonymous20-Apr-05 15:33
Anonymous20-Apr-05 15:33 
Generalmanifest for win 2000 Pin
V.G7-Apr-05 19:26
V.G7-Apr-05 19:26 
GeneralRe: manifest for win 2000 Pin
ThatsAlok7-Apr-05 19:57
ThatsAlok7-Apr-05 19:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.