[mythtv] Getting Processor Type/Features in Win32 (was: Re: [mythtv-commits] Ticket #4497: Win32 builds broken after r15435)

David George david at thegeorges.us
Tue Jan 22 16:07:26 UTC 2008


On 01/22/2008 10:06 AM, Daniel Kristjansson wrote:
>
> How about fixing the CPU detection on MS Windows? The current
> ./configure script can detect the CPU using /proc on Linux and
> an equivalent kernel file system on OSX. There must be some way
> to ask MS Windows for the CPU in use, or at least some program
> we can compile and run to detect the CPU..
>   

Here is a link to example source for getting system info from Windows:
http://msdn2.microsoft.com/en-us/library/ms724423(VS.85).aspx

Here is a description of the GetSystemInfo function:
http://msdn2.microsoft.com/en-us/library/ms724381(VS.85).aspx

Here is a link to information on the SYSTEM_INFO structure:
http://msdn2.microsoft.com/en-us/library/ms724958(VS.85).aspx

If you need to find out if the processor has specific features like 
3Dnow or MMX use IsProcessorFeaturePresent:
http://msdn2.microsoft.com/en-us/library/ms724482(VS.85).aspx

If I get some time I could probably right a little C program that would 
get the type, model and stepping.  But I'm pretty swamped right now, so 
it would probably happen quicker if someone else did it.

-- 
David



More information about the mythtv-dev mailing list