2009-09-24 44 views

回答

2

你可以從的GetSystemInfo API調用的信息:

[DllImport("coredll")] 
static extern void GetSystemInfo(ref SYSTEM_INFO pSI); 

public struct SYSTEM_INFO 
{ 
    public uint dwOemId; 
    public uint dwPageSize; 
    public uint lpMinimumApplicationAddress; 
    public uint lpMaximumApplicationAddress; 
    public uint dwActiveProcessorMask; 
    public uint dwNumberOfProcessors; 
    public uint dwProcessorType; 
    public uint dwAllocationGranularity; 
    public uint dwProcessorLevel; 
    public uint dwProcessorRevision; 
} 

運行在模擬器上,dwProcessorType返回2577,這是我記得的是ARM處理器的ID,所以這將工作(儘管你將需要挖掘哪些值涉及哪些處理器)。

你需要使用這個指令上面的代碼工作,當然:

using System.Runtime.InteropServices; 
相關問題