Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "processor" in [All]

kernel32

.

    public ushort wProcessorArchitecture;

.

    private const uint ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 0x001;

.

        internal _PROCESSOR_INFO_UNION uProcessorInfo;

.

        public IntPtr dwActiveProcessorMask;

.

        public uint dwNumberOfProcessors;

.

        public uint dwProcessorType;

.

        public ushort dwProcessorLevel;

.

        public ushort dwProcessorRevision;

.

    internal struct _PROCESSOR_INFO_UNION

.

        internal ushort wProcessorArchitecture;

.

        internal _PROCESSOR_INFO_UNION uProcessorInfo;

.

        public IntPtr dwActiveProcessorMask;

.

        public uint dwNumberOfProcessors;

.

        public uint dwProcessorType;

.

        public ushort dwProcessorLevel;

.

        public ushort dwProcessorRevision;

.

    internal struct _PROCESSOR_INFO_UNION

.

        internal ushort wProcessorArchitecture;

.
Summary
Retrieves the number of the (logical) processor the current thread was running on during the call to this function.
.

public static extern int GetCurrentProcessorNumber();

.

Declare Function GetCurrentProcessorNumber Lib "kernel32.dll" (TODO) As TODO

.
Documentation
[GetCurrentProcessorNumber] on MSDN
.

    internal const ushort PROCESSOR_ARCHITECTURE_INTEL = 0;

.

    internal const ushort PROCESSOR_ARCHITECTURE_IA64 = 6;

.

    internal const ushort PROCESSOR_ARCHITECTURE_AMD64 = 9;

.

    internal const ushort PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF;

.

      public ushort wProcessorArchitecture;

.

      public UIntPtr dwActiveProcessorMask;

.

      public uint dwNumberOfProcessors;

.

      public uint dwProcessorType;

.

      public ushort wProcessorLevel;

.

      public ushort wProcessorRevision;

.

      switch(sysInfo.wProcessorArchitecture)

.

    case PROCESSOR_ARCHITECTURE_IA64:

.

    case PROCESSOR_ARCHITECTURE_AMD64:

.

    case PROCESSOR_ARCHITECTURE_INTEL:

.

        /// know the number of ProcessorGroup (Eric Ouellet)

.

        public static int GetProcessorGroupCount()

.

            uint processorGroup = 0;

.

                GetNumaHighestNodeNumber(out processorGroup);

.

            return (int) processorGroup + 1; // Node number start ar 0

.

    public enum ProcessorArchitecture

.

        public ProcessorArchitecture ProcessorArchitecture; // WORD

.

        public IntPtr ActiveProcessorMask; // DWORD*

.

        public uint NumberOfProcessors; // DWORD (WTF)

.

        public uint ProcessorType; // DWORD

.

        public ushort ProcessorLevel; // WORD

.

        public ushort ProcessorRevision; // WORD

.

        public UInt16 ProcessorArchitecture;

.

        public UInt32 ActiveProcessorMask;

.

        public UInt32 NumberOfProcessors;

.

        public UInt32 ProcessorType;

.

        public UInt16 ProcessorLevel;

.

        public UInt16 ProcessorRevision;

.
Summary
Retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors.
.
Summary
.

static extern bool IsProcessorFeaturePresent(ProcessorFeature processorFeature);

.

public enum ProcessorFeature : uint {

.

    /// The processor is PAE-enabled

.
Documentation
[IsProcessorFeaturePresent] on MSDN
.

Use this instead of the processor architecture to determine if you are running on 64 bit.  You can use GetProcAddess to determine if your OS supports it (XP SP2 or greater).

.

    public UInt32 processorArchitecture;

.

//limit to one processor

.

System.Diagnostics.Process.ProcessorAffinity Property

.

MSDN reference http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.processoraffinity.aspx

winspool

.

        public string pszPrintProcessor;

.

[DllImport("winspool.drv", EntryPoint="EnumPrintProcessorDatatypes")]

.

public static extern int EnumPrintProcessorDatatypesA(string pName, string pPrintProcessorName, int Level, ref byte pDatatypes, int cdBuf, ref int pcbNeeded, ref int pcRetruned)

.

Declare Function EnumPrintProcessorDatatypes Lib "winspool.drv" Alias "EnumPrintProcessorDatatypesA" (ByVal pName As String, ByVal pPrintProcessorName As String, ByVal Level As Integer, ByRef pDatatypes As Byte, ByVal cdBuf As Integer, ByRef pcbNeeded As Integer, ByRef pcRetruned As Integer) As Integer

.

public static class PrintProcessor {

.

    private static extern bool EnumPrintProcessorDatatypes(string name,

.

    string printProcessorName, UInt32 level, IntPtr dataTypesBuf,

.

    public static IEnumerable<string> GetPrintProcessorDataTypes(string printProcessorName) {

.

    return GetPrintProcessorDataTypes(string.Empty, printProcessorName);

.

    public static IEnumerable<string> GetPrintProcessorDataTypes(string serverName, string printProcessorName) {

.

    if (EnumPrintProcessorDatatypes(serverName, printProcessorName, 1, IntPtr.Zero, 0, ref bytesNeeded, ref numStructsReturned)) {

.

        if (EnumPrintProcessorDatatypes(serverName, printProcessorName, 1, rawBuffer, bytesNeeded, ref bytesNeeded, ref numStructsReturned)) {

.
Documentation
[EnumPrintProcessorDatatypes] on MSDN
.
Summary
Enumerates the PrintProcessors on a specified server
.

      private static extern bool EnumPrintProcessors(string pName,string pEnvironment,UInt32 Level,IntPtr pPrintProcessorInfo,UInt32 cbBuf,

.

Declare Function EnumPrintProcessors Lib "winspool.drv" (TODO) As TODO

.

PRINTPROCESSOR_INFO_1

.

     if (EnumPrintProcessors("","",1,IntPtr.Zero, 0, ref cbNeeded, ref cReturned))

.

        if (EnumPrintProcessors("", "", 1, pAddr, cbNeeded , ref cbNeeded, ref cReturned))

.

           PRINTPROCESSOR_INFO_1[] printprocessorInfo1 = new PRINTPROCESSOR_INFO_1[cReturned];

.

           Type type = typeof(PRINTPROCESSOR_INFO_1);

.

          printprocessorInfo1[i] = (PRINTPROCESSOR_INFO_1)Marshal.PtrToStructure(new IntPtr(offset), type);

.

           return printprocessorInfo1;

.
Documentation
[EnumPrintProcessors] on MSDN
.

        GetPrintProcessorDirectory(null, null, 1, str, 1024, ref i);

.

        GetPrintProcessorDirectory(null, null, 1, str, 1024, ref i);

.

Gets the directory of the current PrinterProcessor.

.

static extern bool GetPrintProcessorDirectory(StringBuilder pName, StringBuilder pEnv, int Level, [Out] StringBuilder outPath, int bufferSize,

.

Declare Function GetPrintProcessorDirectory Lib "winspool.dll" (TODO) As TODO

.

    static extern bool GetPrintProcessorDirectory(StringBuilder pName,

.

    GetPrintProcessorDirectory(null, null, 1, str, 1024, ref length );

.
Documentation
[GetPrintProcessorDirectory] on MSDN
19: print
.

   public struct PRINTPROCESSOR_INFO_1

.
Documentation
[PRINTPROCESSOR_INFO_1] on MSDN
.

   public struct PRINTPROCESSOR_INFO_1

.
Documentation
[PRINTPROCESSOR_INFO_1] on MSDN

Structures

21: ACTCTX
.

     public ushort wProcessorArchitecture;

.

    Public wProcessorArchitecture As System.UInt16

.

    IsOnlyForSingleCoreProcessor = &H4000

.

        /// of processor, and the configuration of the operating system. For example, this

.

        /// value is approximately 2 GB for most 32-bit processes on an x86 processor and

.

        public string pPrintProcessor;

.

        Public pPrintProcessor As String

.
Summary
The SYSTEM_INFO structure contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information.
.

    public ushort processorArchitecture;

.

    public IntPtr activeProcessorMask;

.

    public uint numberOfProcessors;

.

    public uint processorType;

.

    public ushort processorLevel;

.

    public ushort processorRevision;

.

    Dim wProcessorArchitecture As Int16

.

    Dim dwActiveProcessorMask As Integer

.

    Dim dwNumberOfProcessors As Integer

.

    Dim dwProcessorType As Integer

.

    Dim wProcessorLevel As Int16

.

    Dim wProcessorRevision As Int16

.

    public bool ProcessorThrottle;

.

    public byte ProcessorMinThrottle;

.

    public byte ProcessorMaxThrottle;    // Also known as ProcessorThrottleScale before Windows XP

Interfaces

.

    afPA_None           =   0x0000,     // Processor Architecture unspecified

.

    afPA_MSIL           =   0x0010,     // Processor Architecture: neutral (PE32)

.

    afPA_x86        =   0x0020,     // Processor Architecture: x86 (PE32)

.

    afPA_IA64           =   0x0030,     // Processor Architecture: Itanium (PE32+)

.

    afPA_AMD64          =   0x0040,     // Processor Architecture: AMD X64 (PE32+)

.

    afPA_Mask           =   0x0070,     // Bits describing the processor architecture

.

    public IntPtr rProcessor;        // Processor ID array.

.

    public uint ulProcessor;         // [IN/OUT] Size of the Processor ID array/Actual # of entries filled in.

.

      ///virtual HRESULT STDMETHODCALLTYPE GetInputProcessorProfiles(

.

      ///    /* [out] */ ITfInputProcessorProfiles **ppaip,

.

      int GetInputProcessorProfiles(uint dwThreadId, ref IUnknown ppaip, ref uint pdwThreadId);

coredll

.

    Public Enum ProcessorArchitecture As Int16

.

        PROCESSOR_ARCHITECTURE_INTEL = 0

.

        PROCESSOR_ARCHITECTURE_MIPS = 1

.

        PROCESSOR_ARCHITECTURE_ALPHA = 2

.

        PROCESSOR_ARCHITECTURE_PPC = 3

.

        PROCESSOR_ARCHITECTURE_SHX = 4

.

        PROCESSOR_ARCHITECTURE_ARM = 5

.

        PROCESSOR_ARCHITECTURE_IA64 = 6

.

        PROCESSOR_ARCHITECTURE_ALPHA64 = 7

.

        PROCESSOR_ARCHITECTURE_UNKNOWN = &hFFFF;

.

        public short wProcessorArch;

.

        public int dwActiveProcessorMask;

.

        public int dwNumberOfProcessors;

.

        public int dwProcessorType;

.

        public short dwProcessorLevel;

.

        public short dwProcessorRevision;

.

        public short wProcessorArch;

.

        public int dwActiveProcessorMask;

.

        public int dwNumberOfProcessors;

.

        public int dwProcessorType;

.

        public short dwProcessorLevel;

.

        public short dwProcessorRevision;

.

    public enum ProcessorArchitecture : int

.

     PROCESSOR_ARCHITECTURE_INTEL = 0,

.

     PROCESSOR_ARCHITECTURE_MIPS = 1,

.

     PROCESSOR_ARCHITECTURE_ALPHA = 2,

.

     PROCESSOR_ARCHITECTURE_PPC = 3,

.

     PROCESSOR_ARCHITECTURE_SHX = 4,

.

     PROCESSOR_ARCHITECTURE_ARM = 5,

.

     PROCESSOR_ARCHITECTURE_IA64 = 6,

.

     PROCESSOR_ARCHITECTURE_ALPHA64 = 7,

.

     PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF,

.

    public static ProcessorArchitecture GetProcessorArch()

.

        return ProcessorArchitecture.PROCESSOR_ARCHITECTURE_UNKNOWN; // probably no coredll

.

        return (ProcessorArchitecture)si.wProcessorArch;

.

        return (ProcessorArchitecture)si.wProcessorArch;

pdh

.

const uint iProcessorQueueLength = 44; //counter object we want the name for

.

iRet = PdhLookupPerfNameByIndex(null, iProcessorQueueLength, buffer, ref bufSize);

powrprof

.

    const int ProcessorInformation = 11;

.

    struct PROCESSOR_POWER_INFORMATION

.

        [Out] PROCESSOR_POWER_INFORMATION[] lpOutputBuffer,

.

        int procCount = Environment.ProcessorCount;

.

        PROCESSOR_POWER_INFORMATION[] procInfo =

.

        new PROCESSOR_POWER_INFORMATION[procCount];

.

        ProcessorInformation,

.

        procInfo.Length * Marshal.SizeOf(typeof(PROCESSOR_POWER_INFORMATION))

ntdll

.

    SystemProcessorInformation = 0x0001,

.

    SystemProcessorPerformanceInformation = 0x0008,

.

    SystemProcessorIdleInformation = 0x002A,

.

    SystemNumaProcessorMap = 0x0037,

.

    SystemProcessorPowerInformation = 0x003D,

.

    SystemEmulationProcessorInformation = 0x003F,

.

    SystemLogicalProcessorInformation = 0x0049,

.

    SystemProcessorIdleCycleTimeInformation = 0x0053,

.

    SystemProcessorPowerInformationEx = 0x0055,

.

    SystemProcessorPerformanceDistribution = 0x0064,

.

    SystemProcessorMicrocodeUpdateInformation = 0x0068,

.

    SystemProcessorBrandString = 0x0069,

.

    SystemLogicalProcessorAndGroupInformation = 0x006B,

.

    SystemProcessorCycleTimeInformation = 0x006C,

.

    SystemProcessorProfileControlArea = 0x0081,

.

    SystemHypervisorProcessorCountInformation = 0x0087,

.

    SystemProcessorPerformanceInformationEx = 0x008D,

advapi32

.

    SHTDN_REASON_MINOR_PROCESSOR        = 0x00000008,

.

    SHTDN_REASON_MINOR_PROCESSOR = &H8UI

.

    SHTDN_REASON_MINOR_PROCESSOR        = 0x00000008,

.

    SHTDN_REASON_MINOR_PROCESSOR = &H8UI

iphlpapi

.

        IF_TYPE_A12MPPSWITCH = 130,  // Avalon Parallel Processor

Constants

.

    public static readonly Guid GUID_DEVCLASS_PROCESSOR = new Guid("{0x50127dc3, 0x0f36, 0x415e, {0xa6, 0xcc, 0x4c, 0xb3, 0xbe, 0x91, 0x0B, 0x65}}");

.

    public static Guid GUID_DEVICE_PROCESSOR = new Guid("97FADB10-4E33-40AE-359C-8BEF029DBDD0");

.

    public static Guid KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR = new Guid("830A44F2-A32D-476B-BE97-42845673B35A");

.

    public static Guid KSMFT_CATEGORY_VIDEO_PROCESSOR = new Guid("302ea3fc-aa5f-47f9-9f7a-c2188bb16302");

38: NERR_
.

        /// <summary> 2160 - The print processor is not responding. </summary>

.

        /// <summary> 2167 - The data type is not supported by the print processor. </summary>

.

        /// <summary> 2168 - The print processor is not installed. </summary>

.

        /// <summary> 2204 - @W The logon processor did not add the message alias. </summary>

.

        /// <summary> 2205 - The logon processor did not add the message alias. </summary>

.

        /// <summary> 2206 - @W The logoff processor did not delete the message alias. </summary>

.

        /// <summary> 2207 - The logoff processor did not delete the message alias. </summary>

.

        /// <summary> 2280 - An error occurred in the domain message processor. </summary>

.

        public const int GrpMsgProcessor = 2280;

.

        /// This installation package is not supported by this processor type. Contact your product vendor.

.

        /// The print processor is unknown.

.

        public const int ERROR_UNKNOWN_PRINTPROCESSOR = 1798;

.

        /// The specified print processor has already been installed.

.

        public const int ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005;

Enums

.

    MinorProcessor = 0x00000008,

.

     MinorProcessor = &H8

.

        /// Nonzero if the computer has a low-end (slow) processor; otherwise, 0.

.

    ''' Nonzero if the computer has a low-end (slow) processor; zero otherwise

comctl32

.

      processorArchitecture="*"

.

      processorArchitecture="*"


 
Access PInvoke.net directly from VS: