⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfgmgr32.pas

📁 East make Tray Icon in delphi
💻 PAS
📖 第 1 页 / 共 5 页
字号:
  //
  // MEM_RANGE Structure
  //
  PMEM_RANGE = ^MEM_RANGE;
  {$EXTERNALSYM PMEM_RANGE}
  MEM_RANGE = packed record
    MR_Align: DWORDLONG;     // specifies mask for base alignment
    MR_nBytes: ULONG;        // specifies number of bytes required
    MR_Min: DWORDLONG;       // specifies minimum address of the range
    MR_Max: DWORDLONG;       // specifies maximum address of the range
    MR_Flags: DWORD;         // specifies flags describing range (fMD flags)
    MR_Reserved: DWORD;
  end;
  {$EXTERNALSYM MEM_RANGE}

  //
  // MEM_DES structure
  //
  PMEM_DES = ^MEM_DES;
  {$EXTERNALSYM PMEM_DES}
  MEM_DES = packed record
    MD_Count: DWORD;            // number of MEM_RANGE structs in MEM_RESOURCE
    MD_Type: DWORD;             // size (in bytes) of MEM_RANGE (MType_Range)
    MD_Alloc_Base: DWORDLONG;   // base memory address of range allocated
    MD_Alloc_End: DWORDLONG;    // end of allocated range
    MD_Flags: DWORD;            // flags describing allocated range (fMD flags)
    MD_Reserved: DWORD;
  end;
  {$EXTERNALSYM MEM_DES}

  //
  // MEM_RESOURCE structure
  //
  PMEM_RESOURCE = ^MEM_RESOURCE;
  {$EXTERNALSYM PMEM_RESOURCE}
  MEM_RESOURCE = packed record
    MEM_Header: MEM_DES;                  // info about memory range list
    MEM_Data: array [0..0] of MEM_RANGE;  // list of memory ranges
  end;
  {$EXTERNALSYM MEM_RESOURCE}

const
  //
  // Define the size of each range structure
  //
  MType_Range = SizeOf(MEM_RANGE);
  {$EXTERNALSYM MType_Range}

//--------------------------------------------------------------
// I/O Port Resource
//--------------------------------------------------------------

const
  //
  // Define the attribute flags for port resources.  Each bit flag is
  // identified by a constant bitmask.  Following the bitmask definition,
  // are the two possible values.
  //
  fIOD_PortType   = $1;    // Bitmask,whether port is IO or memory
  {$EXTERNALSYM fIOD_PortType}
  fIOD_Memory     = $0;    // Port resource really uses memory
  {$EXTERNALSYM fIOD_Memory}
  fIOD_IO         = $1;    // Port resource uses IO ports
  {$EXTERNALSYM fIOD_IO}
  fIOD_DECODE     = $00fc; // decode flags
  {$EXTERNALSYM fIOD_DECODE}
  fIOD_10_BIT_DECODE    = $0004;
  {$EXTERNALSYM fIOD_10_BIT_DECODE}
  fIOD_12_BIT_DECODE    = $0008;
  {$EXTERNALSYM fIOD_12_BIT_DECODE}
  fIOD_16_BIT_DECODE    = $0010;
  {$EXTERNALSYM fIOD_16_BIT_DECODE}
  fIOD_POSITIVE_DECODE  = $0020;
  {$EXTERNALSYM fIOD_POSITIVE_DECODE}
  fIOD_PASSIVE_DECODE   = $0040;
  {$EXTERNALSYM fIOD_PASSIVE_DECODE}
  fIOD_WINDOW_DECODE    = $0080;
  {$EXTERNALSYM fIOD_WINDOW_DECODE}

  //
  // these are for compatiblity
  //
  IO_ALIAS_10_BIT_DECODE      = $00000004;
  {$EXTERNALSYM IO_ALIAS_10_BIT_DECODE}
  IO_ALIAS_12_BIT_DECODE      = $00000010;
  {$EXTERNALSYM IO_ALIAS_12_BIT_DECODE}
  IO_ALIAS_16_BIT_DECODE      = $00000000;
  {$EXTERNALSYM IO_ALIAS_16_BIT_DECODE}
  IO_ALIAS_POSITIVE_DECODE    = $000000FF;
  {$EXTERNALSYM IO_ALIAS_POSITIVE_DECODE}

type
  //
  // IO_RANGE structure
  //
  PIO_RANGE = ^IO_RANGE;
  {$EXTERNALSYM PIO_RANGE}
  IO_RANGE = packed record
    IOR_Align: DWORDLONG;      // mask for base alignment
    IOR_nPorts: DWORD;         // number of ports
    IOR_Min: DWORDLONG;        // minimum port address
    IOR_Max: DWORDLONG;        // maximum port address
    IOR_RangeFlags: DWORD;     // flags for this port range
    IOR_Alias: DWORDLONG;      // multiplier that generates aliases for port(s)
  end;
  {$EXTERNALSYM IO_RANGE}

  //
  // IO_DES structure
  //
  PIO_DES = ^IO_DES;
  {$EXTERNALSYM PIO_DES}
  IO_DES = packed record
    IOD_Count: DWORD;          // number of IO_RANGE structs in IO_RESOURCE
    IOD_Type: DWORD;           // size (in bytes) of IO_RANGE (IOType_Range)
    IOD_Alloc_Base: DWORDLONG; // base of allocated port range
    IOD_Alloc_End: DWORDLONG;  // end of allocated port range
    IOD_DesFlags: DWORD;       // flags relating to allocated port range
  end;
  {$EXTERNALSYM IO_DES}

  //
  // IO_RESOURCE
  //
  PIO_RESOURCE = ^IO_RESOURCE;
  {$EXTERNALSYM PIO_RESOURCE}
  IO_RESOURCE = packed record
    IO_Header: IO_DES;                 // info about I/O port range list
    IO_Data: array [0..0] of IO_RANGE; // list of I/O port ranges
  end;
  {$EXTERNALSYM IO_RESOURCE}

const
  IOA_Local = $ff;
  {$EXTERNALSYM IOA_Local}

  //
  // Define the size of each range structure
  //
  IOType_Range = SizeOf(IO_RANGE);
  {$EXTERNALSYM IOType_Range}

//--------------------------------------------------------------
// DMA Resource
//--------------------------------------------------------------

const
  //
  // Define the attribute flags for a DMA resource range.  Each bit flag is
  // identified with a constant bitmask.  Following the bitmask definition
  // are the possible values.
  //
  mDD_Width         = $3;    // Bitmask, width of the DMA channel:
  {$EXTERNALSYM mDD_Width}
  fDD_BYTE          = $0;    //   8-bit DMA channel
  {$EXTERNALSYM fDD_BYTE}
  fDD_WORD          = $1;    //   16-bit DMA channel
  {$EXTERNALSYM fDD_WORD}
  fDD_DWORD         = $2;    //   32-bit DMA channel
  {$EXTERNALSYM fDD_DWORD}
  fDD_BYTE_AND_WORD = $3;    //   8-bit and 16-bit DMA channel
  {$EXTERNALSYM fDD_BYTE_AND_WORD}

  mDD_BusMaster     = $4;    // Bitmask, whether bus mastering is supported
  {$EXTERNALSYM mDD_BusMaster}
  fDD_NoBusMaster   = $0;    //   no bus mastering
  {$EXTERNALSYM fDD_NoBusMaster}
  fDD_BusMaster     = $4;    //   bus mastering
  {$EXTERNALSYM fDD_BusMaster}

  mDD_Type         = $18;    // Bitmask, specifies type of DMA
  {$EXTERNALSYM mDD_Type}
  fDD_TypeStandard = $00;    //   standard DMA
  {$EXTERNALSYM fDD_TypeStandard}
  fDD_TypeA        = $08;    //   Type-A DMA
  {$EXTERNALSYM fDD_TypeA}
  fDD_TypeB        = $10;    //   Type-B DMA
  {$EXTERNALSYM fDD_TypeB}
  fDD_TypeF        = $18;    //   Type-F DMA
  {$EXTERNALSYM fDD_TypeF}

type
  //
  // DMA_RANGE structure
  //
  PDMA_RANGE = ^DMA_RANGE;
  {$EXTERNALSYM PDMA_RANGE}
  DMA_RANGE = packed record
    DR_Min: ULONG;     // minimum DMA port in the range
    DR_Max: ULONG;     // maximum DMA port in the range
    DR_Flags: ULONG;   // flags describing the range (fDD flags)
  end;
  {$EXTERNALSYM DMA_RANGE}

  //
  // DMA_DES structure
  //
  PDMA_DES = ^DMA_DES;
  {$EXTERNALSYM PDMA_DES}
  DMA_DES = packed record
    DD_Count: DWORD;       // number of DMA_RANGE structs in DMA_RESOURCE
    DD_Type: DWORD;        // size (in bytes) of DMA_RANGE struct (DType_Range)
    DD_Flags: DWORD;       // Flags describing DMA channel (fDD flags)
    DD_Alloc_Chan: ULONG;  // Specifies the DMA channel that was allocated
  end;
  {$EXTERNALSYM DMA_DES}

  //
  // DMA_RESOURCE
  //
  PDMA_RESOURCE = ^DMA_RESOURCE;
  {$EXTERNALSYM PDMA_RESOURCE}
  DMA_RESOURCE = packed record
    DMA_Header: DMA_DES;                  // info about DMA channel range list
    DMA_Data: array [0..0] of DMA_RANGE;  // list of DMA ranges
  end;
  {$EXTERNALSYM DMA_RESOURCE}

const
  //
  // Define the size of each range structure
  //
  DType_Range = SizeOf(DMA_RANGE);
  {$EXTERNALSYM DType_Range}

//--------------------------------------------------------------
// Interrupt Resource
//--------------------------------------------------------------

const
  //
  // Define the attribute flags for an interrupt resource range.  Each bit flag
  // is identified with a constant bitmask.  Following the bitmask definition
  // are the possible values.
  //
  mIRQD_Share        = $1; // Bitmask,whether the IRQ may be shared:
  {$EXTERNALSYM mIRQD_Share}
  fIRQD_Exclusive    = $0; //   The IRQ may not be shared
  {$EXTERNALSYM fIRQD_Exclusive}
  fIRQD_Share        = $1; //   The IRQ may be shared
  {$EXTERNALSYM fIRQD_Share}

  fIRQD_Share_Bit    = 0;     // compatibility
  {$EXTERNALSYM fIRQD_Share_Bit}
  fIRQD_Level_Bit    = 1;     // compatibility
  {$EXTERNALSYM fIRQD_Level_Bit}

  //
  // ** NOTE: 16-bit ConfigMgr uses fIRQD_Level_Bit being set to indicate that the
  // ** interrupt is _level-sensitive_.  For 32-bit ConfigMgr, if this bit is set,
  // ** then the interrupt is _edge-sensitive_.
  //
  mIRQD_Edge_Level   = $2; // Bitmask,whether edge or level triggered:
  {$EXTERNALSYM mIRQD_Edge_Level}
  fIRQD_Level        = $0; //   The IRQ is level-sensitive
  {$EXTERNALSYM fIRQD_Level}
  fIRQD_Edge         = $2; //   The IRQ is edge-sensitive
  {$EXTERNALSYM fIRQD_Edge}

type
  //
  // IRQ_RANGE
  //
  PIRQ_RANGE = ^IRQ_RANGE;
  {$EXTERNALSYM PIRQ_RANGE}
  IRQ_RANGE = packed record
    IRQR_Min: ULONG;      // minimum IRQ in the range
    IRQR_Max: ULONG;      // maximum IRQ in the range
    IRQR_Flags: ULONG;    // flags describing the range (fIRQD flags)
  end;
  {$EXTERNALSYM IRQ_RANGE}

  //
  // IRQ_DES structure
  //
  PIRQ_DES_32 = ^IRQ_DES_32;
  {$EXTERNALSYM PIRQ_DES_32}
  IRQ_DES_32 = packed record
    IRQD_Count: DWORD;       // number of IRQ_RANGE structs in IRQ_RESOURCE
    IRQD_Type: DWORD;        // size (in bytes) of IRQ_RANGE (IRQType_Range)
    IRQD_Flags: DWORD;       // flags describing the IRQ (fIRQD flags)
    IRQD_Alloc_Num: ULONG;   // specifies the IRQ that was allocated
    IRQD_Affinity: ULONG32;
  end;
  {$EXTERNALSYM IRQ_DES_32}

  PIRQ_DES_64 = ^IRQ_DES_64;
  {$EXTERNALSYM PIRQ_DES_64}
  IRQ_DES_64 = packed record
    IRQD_Count: DWORD;       // number of IRQ_RANGE structs in IRQ_RESOURCE
    IRQD_Type: DWORD;        // size (in bytes) of IRQ_RANGE (IRQType_Range)
    IRQD_Flags: DWORD;       // flags describing the IRQ (fIRQD flags)
    IRQD_Alloc_Num: ULONG;   // specifies the IRQ that was allocated
    IRQD_Affinity: ULONG64;
  end;
  {$EXTERNALSYM IRQ_DES_64}

  {$IFDEF _WIN64}
  IRQ_DES = IRQ_DES_64;
  PIRQ_DES = PIRQ_DES_64;
  {$ELSE}
  IRQ_DES = IRQ_DES_32;
  PIRQ_DES = PIRQ_DES_32;
  {$ENDIF UNICODE}
  {$EXTERNALSYM IRQ_DES}
  {$EXTERNALSYM PIRQ_DES}

  //
  // IRQ_RESOURCE structure
  //
  PIRQ_RESOURCE_32 = ^IRQ_RESOURCE_32;
  {$EXTERNALSYM PIRQ_RESOURCE_32}
  IRQ_RESOURCE_32 = packed record
    IRQ_Header: IRQ_DES_32;               // info about IRQ range list
    IRQ_Data: array [0..0] of IRQ_RANGE;  // list of IRQ ranges
  end;
  {$EXTERNALSYM IRQ_RESOURCE_32}

  PIRQ_RESOURCE_64 = ^IRQ_RESOURCE_64;
  {$EXTERNALSYM PIRQ_RESOURCE_64}
  IRQ_RESOURCE_64 = packed record
    IRQ_Header: IRQ_DES_64;               // info about IRQ range list
    IRQ_Data: array [0..0] of IRQ_RANGE;  // list of IRQ ranges
  end;
  {$EXTERNALSYM IRQ_RESOURCE_64}

  {$IFDEF _WIN64}
  IRQ_RESOURCE = IRQ_RESOURCE_64;
  PIRQ_RESOURCE = PIRQ_RESOURCE_64;
  {$ELSE}
  IRQ_RESOURCE = IRQ_RESOURCE_32;
  PIRQ_RESOURCE = PIRQ_RESOURCE_32;
  {$ENDIF _WIN64}
  {$EXTERNALSYM IRQ_RESOURCE}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -