configmg.h
Upload User: caisha3
Upload Date: 2013-09-21
Package Size: 208739k
Code Size: 71k
Category:

Windows Develop

Development Platform:

Visual C++

  1. /*****************************************************************************
  2.  *
  3.  * (C) Copyright MICROSOFT Corp., 1993-1998
  4.  *
  5.  * Title: CONFIGMG.H - Configuration manager header file
  6.  *
  7.  * Version: 1.00
  8.  *
  9.  * Date: 02-Feb-1993
  10.  *
  11.  * Authors: PYS & RAL
  12.  *
  13.  *------------------------------------------------------------------------------
  14.  *
  15.  * Change log:
  16.  *
  17.  *    DATE     REV DESCRIPTION
  18.  * ----------- --- -----------------------------------------------------------
  19.  * 02-Feb-1993 PYS Original
  20.  *****************************************************************************/
  21. #ifndef _CONFIGMG_H
  22. #define _CONFIGMG_H
  23. #define CONFIGMG_VERSION 0x0400
  24. #define PNPDRVS_Major_Ver 0x0004
  25. #define PNPDRVS_Minor_Ver 0x0000
  26. #ifdef MAXDEBUG
  27. #define CM_PERFORMANCE_INFO
  28. #endif
  29. #ifdef GOLDEN
  30. #ifdef RETAIL
  31. #define CM_GOLDEN_RETAIL
  32. #endif
  33. #endif
  34. /*XLATOFF*/
  35. #pragma pack(1)
  36. /*XLATON*/
  37. #ifndef NORESDES
  38. /****************************************************************************
  39.  *
  40.  * EQUATES FOR RESOURCE DESCRIPTOR
  41.  *
  42.  * The equates for resource descriptor work the exact same way as those
  43.  * for VxD IDs, which is:
  44.  *
  45.  * Device ID's are a combination of OEM # and device # in the form:
  46.  *
  47.  * xOOOOOOOOOODDDDD
  48.  *
  49.  * The high bit of the device ID is reserved for future use.  The next
  50.  * 10 bits are the OEM # which is assigned by Microsoft.  The last 5 bits
  51.  * are the device #.  This allows each OEM to create 32 unique devices.
  52.  * If an OEM is creating a replacement for a standard device, then it
  53.  * should re-use the standard ID listed below.  Microsoft reserves the
  54.  * first 16 OEM #'s (0 thru 0Fh)
  55.  *
  56.  * To make your resource ID, you must use the same 10 OEMs bit that
  57.  * have been given by Microsoft as OEM VxD ID range. You can then tag
  58.  * any of the 32 unique number in that range (it does not have to be
  59.  * the same as the VxD as some VxD may have mupltiple arbitrators).
  60.  *
  61.  * If the ResType_Ignored_Bit is set, the resource is not arbitrated.
  62.  * You cannot register a handler for such a resource.
  63.  *
  64.  ***************************************************************************/
  65. #define ResType_All 0x00000000 // Return all resource types.
  66. #define ResType_None 0x00000000 // Arbitration always succeeded.
  67. #define ResType_Mem 0x00000001 // Physical address resource.
  68. #define ResType_IO 0x00000002 // Physical IO address resource.
  69. #define ResType_DMA 0x00000003 // DMA channels 0-7 resource.
  70. #define ResType_IRQ 0x00000004 // IRQ 0-15 resource.
  71. #define ResType_Max 0x00000004 // Max KNOWN ResType (for DEBUG).
  72. #define ResType_Ignored_Bit 0x00008000 // This resource is to be ignored.
  73. #define DEBUG_RESTYPE_NAMES 
  74. char CMFAR *lpszResourceName[ResType_Max+1]= 
  75. "All/None", 
  76. "Mem     ", 
  77. "IO      ", 
  78. "DMA     ", 
  79. "IRQ     ", 
  80. };
  81. /************************************************************************
  82.  * *
  83.  * OEMS WHO WANT A VXD DEVICE ID ASSIGNED TO THEM,   *
  84.  * PLEASE CONTACT MICROSOFT PRODUCT SUPPORT  *
  85.  * *
  86.  ************************************************************************/
  87. /****************************************************************************
  88.  *
  89.  * RESOURCE DESCRIPTORS
  90.  *
  91.  * Each resource descriptor consists of an array of resource requests.
  92.  * Exactly one element of the array must be satisfied. The data
  93.  * of each array element is resource specific an described below.
  94.  * The data may specify one or more resource requests. At least
  95.  * one element of a Res_Des must be satisfied to satisfy the request
  96.  * represented by the Res_Des. The values allocated to the Res_Des
  97.  * are stored within the Res_Des.
  98.  * Each subarray (OR element) is a single Res_Des followed
  99.  * by data specific to the type of resource. The data includes the
  100.  * allocated resource (if any) followed by resource requests (which
  101.  * will include the values indicated by the allocated resource.
  102.  *
  103.  ***************************************************************************/
  104. /****************************************************************************
  105.  * Memory resource requests consist of ranges of pages
  106.  ***************************************************************************/
  107. #define MType_Range sizeof(struct Mem_Range_s)
  108. #define fMD_MemoryType 1 // Memory range is ROM/RAM
  109. #define fMD_ROM 0 // Memory range is ROM
  110. #define fMD_RAM 1 // Memory range is RAM
  111. #define fMD_32_24 2 // Memory range is 32/24 (for ISAPNP only)
  112. #define fMD_24 0 // Memory range is 24
  113. #define fMD_32 2 // Memory range is 32
  114. /* Memory Range descriptor data
  115.  */
  116. struct Mem_Range_s {
  117. ULONG MR_Align; // Mask for base alignment
  118. ULONG MR_nBytes; // Count of bytes
  119. ULONG MR_Min; // Min Address
  120. ULONG MR_Max; // Max Address
  121. WORD MR_Flags; // Flags
  122. WORD MR_Reserved;
  123. };
  124. typedef struct Mem_Range_s MEM_RANGE;
  125. /* Mem Resource descriptor header structure
  126.  * MD_Count * MD_Type bytes of data follow header in an
  127.  * array of MEM_RANGE structures. When an allocation is made,
  128.  * the allocated value is stored in the MD_Alloc_... variables.
  129.  *
  130.  * Example for memory Resource Description:
  131.  * Mem_Des_s {
  132.  * MD_Count = 1;
  133.  * MD_Type = MTypeRange;
  134.  * MD_Alloc_Base = 0;
  135.  * MD_Alloc_End = 0;
  136.  * MD_Flags = 0;
  137.  * MD_Reserved = 0;
  138.  * };
  139.  * Mem_Range_s {
  140.  * MR_Align = 0xFFFFFF00; // 256 byte alignment
  141.  * MR_nBytes = 32; // 32 bytes needed
  142.  * MR_Min = 0;
  143.  * MR_Max = 0xFFFFFFFF; // Any place in address space
  144.  * MR_Flags = 0;
  145.  * MR_Reserved = 0;
  146.  * };
  147.  */
  148. struct Mem_Des_s {
  149. WORD MD_Count;
  150. WORD MD_Type;
  151. ULONG MD_Alloc_Base;
  152. ULONG MD_Alloc_End;
  153. WORD MD_Flags;
  154. WORD MD_Reserved;
  155. };
  156. typedef struct Mem_Des_s  MEM_DES;
  157. /****************************************************************************
  158.  * IO resource allocations consist of fixed ranges or variable ranges
  159.  * The Alias and Decode masks provide additional flexibility
  160.  * in specifying how the address is handled. They provide a convenient
  161.  * method for specifying what port aliases a card responds to. An alias
  162.  * is a port address that is responded to as if it were another address.
  163.  * Additionally, some cards will actually use additional ports for
  164.  * different purposes, but use a decoding scheme that makes it look as
  165.  * though it were using aliases. E.G., an ISA card may decode 10 bits
  166.  * and require port 03C0h. It would need to specify an Alias offset of
  167.  * 04h and a Decode of 3 (no aliases are used as actual ports). For
  168.  * convenience, the alias field can be set to zero indicate no aliases
  169.  * are required and then decode is ignored.
  170.  * If the card were to use the ports at 7C0h, 0BC0h and 0FC0h, where these
  171.  * ports have different functionality, the Alias would be the same and the
  172.  * the decode would be 0Fh indicating bits 11 and 12 of the port address
  173.  * are significant. Thus, the allocation is for all of the ports
  174.  * (PORT[i] + (n*Alias*256)) & (Decode*256 | 03FFh), where n is
  175.  * any integer and PORT is the range specified by the nPorts, Min and
  176.  * Max fields. Note that the minimum Alias is 4 and the minimum
  177.  * Decode is 3.
  178.  * Because of the history of the ISA bus, all ports that can be described
  179.  * by the formula PORT = n*400h + zzzz, where "zzzz" is a port in the
  180.  * range 100h - 3FFh, will be checked for compatibility with the port
  181.  * zzzz, assuming that the port zzzz is using a 10 bit decode. If a card
  182.  * is on a local bus that can prevent the IO address from appearing on
  183.  * the ISA bus (e.g. PCI), then the logical configuration should specify
  184.  * an alias of IOA_Local which will prevent the arbitrator from checking
  185.  * for old ISA bus compatibility.
  186.  */
  187. #define IOType_Range sizeof(struct IO_Range_s) // Variable range
  188. /* IO Range descriptor data */
  189. struct IO_Range_s {
  190. WORD IOR_Align; // Mask for base alignment
  191. WORD IOR_nPorts; // Number of ports
  192. WORD IOR_Min; // Min port address
  193. WORD IOR_Max; // Max port address
  194. WORD IOR_RangeFlags; // Flags
  195. BYTE IOR_Alias; // Alias offset
  196. BYTE IOR_Decode; // Address specified
  197. };
  198. typedef struct IO_Range_s IO_RANGE;
  199. /* IO Resource descriptor header structure
  200.  * IOD_Count * IOD_Type bytes of data follow header in an
  201.  * array of IO_RANGE structures. When an allocation is made,
  202.  * the allocated value is stored in the IOD_Alloc_... variables.
  203.  *
  204.  * Example for IO Resource Description:
  205.  * IO_Des_s {
  206.  * IOD_Count = 1;
  207.  * IOD_Type = IOType_Range;
  208.  * IOD_Alloc_Base = 0;
  209.  * IOD_Alloc_End = 0;
  210.  * IOD_Alloc_Alias = 0;
  211.  * IOD_Alloc_Decode = 0;
  212.  * IOD_DesFlags = 0;
  213.  * IOD_Reserved = 0;
  214.  * };
  215.  * IO_Range_s {
  216.  * IOR_Align = 0xFFF0; // 16 byte alignment
  217.  * IOR_nPorts = 16; // 16 ports required
  218.  * IOR_Min = 0x0100;
  219.  * IOR_Max = 0x03FF; // Anywhere in ISA std ports
  220.  * IOR_RangeFlags = 0;
  221.  * IOR_Alias = 0004; // Standard ISA 10 bit aliasing
  222.  * IOR_Decode = 0x000F; // Use first 3 aliases (e.g. if
  223.  * // 0x100 were base port, 0x500
  224.  * // 0x900, and 0xD00 would
  225.  * // also be allocated)
  226.  * };
  227.  */
  228. struct IO_Des_s {
  229. WORD IOD_Count;
  230. WORD IOD_Type;
  231. WORD IOD_Alloc_Base;
  232. WORD IOD_Alloc_End;
  233. WORD IOD_DesFlags;
  234. BYTE IOD_Alloc_Alias;
  235. BYTE IOD_Alloc_Decode;
  236. };
  237. typedef struct IO_Des_s  IO_DES;
  238. /* Definition for special alias value indicating card on PCI or similar local bus
  239.  *  This value should used for the IOR_Alias and IOD_Alias fields
  240.  */
  241. #define IOA_Local 0xff
  242. /****************************************************************************
  243.  * DMA channel resource allocations consist of one WORD channel bit masks.
  244.  * The mask indcates alternative channel allocations,
  245.  * one bit for each alternative (only one is allocated per mask).
  246.  */
  247. /*DMA flags
  248.  *First two are DMA channel width: BYTE, WORD or DWORD
  249.  */
  250. #define mDD_Width 0003h // Mask for channel width
  251. #define fDD_BYTE 0
  252. #define fDD_WORD 1
  253. #define fDD_DWORD 2
  254. #define szDMA_Des_Flags "WD"
  255. /* DMA Resource descriptor structure
  256.  *
  257.  * Example for DMA Resource Description:
  258.  *
  259.  * DMA_Des_s {
  260.  * DD_Flags = fDD_Byte; // Byte transfer
  261.  * DD_Alloc_Chan = 0;
  262.  * DD_Req_Mask = 0x60; // Channel 5 or 6
  263.  * DD_Reserved = 0;
  264.  * };
  265.  */
  266. struct DMA_Des_s {
  267. BYTE DD_Flags;
  268. BYTE DD_Alloc_Chan; // Channel number allocated
  269. BYTE DD_Req_Mask; // Mask of possible channels
  270. BYTE DD_Reserved;
  271. };
  272. typedef struct DMA_Des_s  DMA_DES;
  273. /****************************************************************************
  274.  * IRQ resource allocations consist of two WORD IRQ bit masks.
  275.  * The first mask indcates alternatives for IRQ allocation,
  276.  * one bit for each alternative (only one is allocated per mask). The
  277.  * second mask is used to specify that the IRQ can be shared.
  278.  */
  279. /*
  280.  * IRQ flags
  281.  */
  282. #define fIRQD_Share 1 // IRQ can be shared
  283. #define cIRQ_Des_Flags 'S'
  284. /* IRQ Resource descriptor structure
  285.  *
  286.  * Example for IRQ Resource Description:
  287.  *
  288.  * IRQ_Des_s {
  289.  * IRQD_Flags = fIRQD_Share // IRQ can be shared
  290.  * IRQD_Alloc_Num = 0;
  291.  * IRQD_Req_Mask = 0x18; // IRQ 3 or 4
  292.  * IRQD_Reserved = 0;
  293.  * };
  294.  */
  295. struct IRQ_Des_s {
  296. WORD IRQD_Flags;
  297. WORD IRQD_Alloc_Num; // Allocated IRQ number
  298. WORD IRQD_Req_Mask; // Mask of possible IRQs
  299. WORD IRQD_Reserved;
  300. };
  301. typedef struct IRQ_Des_s  IRQ_DES;
  302. /*XLATOFF*/
  303. /****************************************************************************
  304.  *
  305.  * 'C'-only defined total resource structure. Since a resource consists of
  306.  * one resource header followed by an undefined number of resource data
  307.  * structure, we use the undefined array size [] on the *_DATA structure
  308.  * member. Unfortunately, this does not H2INC since the total size of the
  309.  * array cannot be computed from the definition.
  310.  *
  311.  ***************************************************************************/
  312. #pragma warning (disable:4200) // turn off undefined array size
  313. typedef MEM_DES *PMEM_DES;
  314. typedef MEM_RANGE *PMEM_RANGE;
  315. typedef IO_DES *PIO_DES;
  316. typedef IO_RANGE *PIO_RANGE;
  317. typedef DMA_DES *PDMA_DES;
  318. typedef IRQ_DES *PIRQ_DES;
  319. struct MEM_Resource_s {
  320. MEM_DES MEM_Header;
  321. MEM_RANGE MEM_Data[];
  322. };
  323. typedef struct MEM_Resource_s MEM_RESOURCE;
  324. typedef MEM_RESOURCE *PMEM_RESOURCE;
  325. struct MEM_Resource1_s {
  326. MEM_DES MEM_Header;
  327. MEM_RANGE MEM_Data;
  328. };
  329. typedef struct MEM_Resource1_s MEM_RESOURCE1;
  330. typedef MEM_RESOURCE1 *PMEM_RESOURCE1;
  331. #define SIZEOF_MEM(x) (sizeof(MEM_DES)+(x)*sizeof(MEM_RANGE))
  332. struct IO_Resource_s {
  333. IO_DES IO_Header;
  334. IO_RANGE IO_Data[];
  335. };
  336. typedef struct IO_Resource_s IO_RESOURCE;
  337. typedef IO_RESOURCE *PIO_RESOURCE;
  338. struct IO_Resource1_s {
  339. IO_DES IO_Header;
  340. IO_RANGE IO_Data;
  341. };
  342. typedef struct IO_Resource1_s IO_RESOURCE1;
  343. typedef IO_RESOURCE1 *PIO_RESOURCE1;
  344. #define SIZEOF_IORANGE(x) (sizeof(IO_DES)+(x)*sizeof(IO_RANGE))
  345. struct DMA_Resource_s {
  346. DMA_DES DMA_Header;
  347. };
  348. typedef struct DMA_Resource_s DMA_RESOURCE;
  349. #define SIZEOF_DMA sizeof(DMA_DES)
  350. struct IRQ_Resource_s {
  351. IRQ_DES IRQ_Header;
  352. };
  353. typedef struct IRQ_Resource_s IRQ_RESOURCE;
  354. #define SIZEOF_IRQ sizeof(IRQ_DES)
  355. #pragma warning (default:4200) // turn on undefined array size
  356. /*XLATON*/
  357. #endif // ifndef NORESDES
  358. #define LCPRI_FORCECONFIG 0x00000000 // Logical configuration priorities.
  359. #define LCPRI_BOOTCONFIG 0x00000001
  360. #define LCPRI_HARDWIRED 0x00001000
  361. #define LCPRI_DESIRED 0x00002000
  362. #define LCPRI_NORMAL 0x00003000
  363. #define LCPRI_LASTBESTCONFIG 0x00003FFF // CM ONLY, DO NOT USE.
  364. #define LCPRI_SUBOPTIMAL 0x00005000
  365. #define LCPRI_LASTSOFTCONFIG 0x00007FFF // CM ONLY, DO NOT USE.
  366. #define LCPRI_RESTART 0x00008000
  367. #define LCPRI_REBOOT 0x00009000
  368. #define LCPRI_POWEROFF 0x0000A000
  369. #define LCPRI_HARDRECONFIG 0x0000C000
  370. #define LCPRI_DISABLED 0x0000FFFF
  371. #define MAX_LCPRI 0x0000FFFF
  372. #define MAX_MEM_REGISTERS 9
  373. #define MAX_IO_PORTS 20
  374. #define MAX_IRQS 7
  375. #define MAX_DMA_CHANNELS 7
  376. struct Config_Buff_s {
  377. WORD wNumMemWindows; // Num memory windows
  378. DWORD dMemBase[MAX_MEM_REGISTERS]; // Memory window base
  379. DWORD dMemLength[MAX_MEM_REGISTERS]; // Memory window length
  380. WORD wMemAttrib[MAX_MEM_REGISTERS]; // Memory window Attrib
  381. WORD wNumIOPorts; // Num IO ports
  382. WORD wIOPortBase[MAX_IO_PORTS]; // I/O port base
  383. WORD wIOPortLength[MAX_IO_PORTS]; // I/O port length
  384. WORD wNumIRQs; // Num IRQ info
  385. BYTE bIRQRegisters[MAX_IRQS]; // IRQ list
  386. BYTE bIRQAttrib[MAX_IRQS]; // IRQ Attrib list
  387. WORD wNumDMAs; // Num DMA channels
  388. BYTE bDMALst[MAX_DMA_CHANNELS]; // DMA list
  389. WORD wDMAAttrib[MAX_DMA_CHANNELS]; // DMA Attrib list
  390. BYTE bReserved1[3]; // Reserved
  391. };
  392. typedef struct Config_Buff_s CMCONFIG; // Config buffer info
  393. #ifndef CMJUSTRESDES
  394. #define MAX_DEVICE_ID_LEN 200
  395. #include <vmmreg.h>
  396. /*XLATOFF*/
  397. #ifdef Not_VxD
  398. #include <dbt.h>
  399. #pragma warning(disable:4001) // Non-standard extensions
  400. #pragma warning(disable:4505) // Unreferenced local functions
  401. #ifdef IS_32
  402. #define CMFAR
  403. #else
  404. #define CMFAR _far
  405. #endif
  406. #else // Not_VxD
  407. #define CMFAR
  408. #endif // Not_VxD
  409. #ifdef IS_32
  410. typedef DWORD RETURN_TYPE;
  411. #else // IS_32
  412. typedef WORD RETURN_TYPE;
  413. #endif // IS_32
  414. #define CONFIGMG_Service Declare_Service
  415. /*XLATON*/
  416. /*MACROS*/
  417. Begin_Service_Table(CONFIGMG, VxD)
  418. CONFIGMG_Service (_CONFIGMG_Get_Version, VxD_CODE)
  419. CONFIGMG_Service (_CONFIGMG_Initialize, VxD_CODE)
  420. CONFIGMG_Service (_CONFIGMG_Locate_DevNode, VxD_CODE)
  421. CONFIGMG_Service (_CONFIGMG_Get_Parent, VxD_CODE)
  422. CONFIGMG_Service (_CONFIGMG_Get_Child, VxD_CODE)
  423. CONFIGMG_Service (_CONFIGMG_Get_Sibling, VxD_CODE)
  424. CONFIGMG_Service (_CONFIGMG_Get_Device_ID_Size, VxD_CODE)
  425. CONFIGMG_Service (_CONFIGMG_Get_Device_ID, VxD_CODE)
  426. CONFIGMG_Service (_CONFIGMG_Get_Depth, VxD_CODE)
  427. CONFIGMG_Service (_CONFIGMG_Get_Private_DWord, VxD_CODE)
  428. CONFIGMG_Service (_CONFIGMG_Set_Private_DWord, VxD_CODE)
  429. CONFIGMG_Service (_CONFIGMG_Create_DevNode, VxD_CODE)
  430. CONFIGMG_Service (_CONFIGMG_Query_Remove_SubTree, VxD_CODE)
  431. CONFIGMG_Service (_CONFIGMG_Remove_SubTree, VxD_CODE)
  432. CONFIGMG_Service (_CONFIGMG_Register_Device_Driver, VxD_CODE)
  433. CONFIGMG_Service (_CONFIGMG_Register_Enumerator, VxD_CODE)
  434. CONFIGMG_Service (_CONFIGMG_Register_Arbitrator, VxD_CODE)
  435. CONFIGMG_Service (_CONFIGMG_Deregister_Arbitrator, VxD_CODE)
  436. CONFIGMG_Service (_CONFIGMG_Query_Arbitrator_Free_Size, VxD_CODE)
  437. CONFIGMG_Service (_CONFIGMG_Query_Arbitrator_Free_Data, VxD_CODE)
  438. CONFIGMG_Service (_CONFIGMG_Sort_NodeList, VxD_CODE)
  439. CONFIGMG_Service (_CONFIGMG_Yield, VxD_CODE)
  440. CONFIGMG_Service (_CONFIGMG_Lock, VxD_CODE)
  441. CONFIGMG_Service (_CONFIGMG_Unlock, VxD_CODE)
  442. CONFIGMG_Service (_CONFIGMG_Add_Empty_Log_Conf, VxD_CODE)
  443. CONFIGMG_Service (_CONFIGMG_Free_Log_Conf, VxD_CODE)
  444. CONFIGMG_Service (_CONFIGMG_Get_First_Log_Conf, VxD_CODE)
  445. CONFIGMG_Service (_CONFIGMG_Get_Next_Log_Conf, VxD_CODE)
  446. CONFIGMG_Service (_CONFIGMG_Add_Res_Des, VxD_CODE)
  447. CONFIGMG_Service (_CONFIGMG_Modify_Res_Des, VxD_CODE)
  448. CONFIGMG_Service (_CONFIGMG_Free_Res_Des, VxD_CODE)
  449. CONFIGMG_Service (_CONFIGMG_Get_Next_Res_Des, VxD_CODE)
  450. CONFIGMG_Service (_CONFIGMG_Get_Performance_Info, VxD_CODE)
  451. CONFIGMG_Service (_CONFIGMG_Get_Res_Des_Data_Size, VxD_CODE)
  452. CONFIGMG_Service (_CONFIGMG_Get_Res_Des_Data, VxD_CODE)
  453. CONFIGMG_Service (_CONFIGMG_Process_Events_Now, VxD_CODE)
  454. CONFIGMG_Service (_CONFIGMG_Create_Range_List, VxD_CODE)
  455. CONFIGMG_Service (_CONFIGMG_Add_Range, VxD_CODE)
  456. CONFIGMG_Service (_CONFIGMG_Delete_Range, VxD_CODE)
  457. CONFIGMG_Service (_CONFIGMG_Test_Range_Available, VxD_CODE)
  458. CONFIGMG_Service (_CONFIGMG_Dup_Range_List, VxD_CODE)
  459. CONFIGMG_Service (_CONFIGMG_Free_Range_List, VxD_CODE)
  460. CONFIGMG_Service (_CONFIGMG_Invert_Range_List, VxD_CODE)
  461. CONFIGMG_Service (_CONFIGMG_Intersect_Range_List, VxD_CODE)
  462. CONFIGMG_Service (_CONFIGMG_First_Range, VxD_CODE)
  463. CONFIGMG_Service (_CONFIGMG_Next_Range, VxD_CODE)
  464. CONFIGMG_Service (_CONFIGMG_Dump_Range_List, VxD_CODE)
  465. CONFIGMG_Service (_CONFIGMG_Load_DLVxDs, VxD_CODE)
  466. CONFIGMG_Service (_CONFIGMG_Get_DDBs, VxD_CODE)
  467. CONFIGMG_Service (_CONFIGMG_Get_CRC_CheckSum, VxD_CODE)
  468. CONFIGMG_Service (_CONFIGMG_Register_DevLoader, VxD_CODE)
  469. CONFIGMG_Service (_CONFIGMG_Reenumerate_DevNode, VxD_CODE)
  470. CONFIGMG_Service (_CONFIGMG_Setup_DevNode, VxD_CODE)
  471. CONFIGMG_Service (_CONFIGMG_Reset_Children_Marks, VxD_CODE)
  472. CONFIGMG_Service (_CONFIGMG_Get_DevNode_Status, VxD_CODE)
  473. CONFIGMG_Service (_CONFIGMG_Remove_Unmarked_Children, VxD_CODE)
  474. CONFIGMG_Service (_CONFIGMG_ISAPNP_To_CM, VxD_CODE)
  475. CONFIGMG_Service (_CONFIGMG_CallBack_Device_Driver, VxD_CODE)
  476. CONFIGMG_Service (_CONFIGMG_CallBack_Enumerator, VxD_CODE)
  477. CONFIGMG_Service (_CONFIGMG_Get_Alloc_Log_Conf, VxD_CODE)
  478. CONFIGMG_Service (_CONFIGMG_Get_DevNode_Key_Size, VxD_CODE)
  479. CONFIGMG_Service (_CONFIGMG_Get_DevNode_Key, VxD_CODE)
  480. CONFIGMG_Service (_CONFIGMG_Read_Registry_Value, VxD_CODE)
  481. CONFIGMG_Service (_CONFIGMG_Write_Registry_Value, VxD_CODE)
  482. CONFIGMG_Service (_CONFIGMG_Disable_DevNode, VxD_CODE)
  483. CONFIGMG_Service (_CONFIGMG_Enable_DevNode, VxD_CODE)
  484. CONFIGMG_Service (_CONFIGMG_Move_DevNode, VxD_CODE)
  485. CONFIGMG_Service (_CONFIGMG_Set_Bus_Info, VxD_CODE)
  486. CONFIGMG_Service (_CONFIGMG_Get_Bus_Info, VxD_CODE)
  487. CONFIGMG_Service (_CONFIGMG_Set_HW_Prof, VxD_CODE)
  488. CONFIGMG_Service (_CONFIGMG_Recompute_HW_Prof, VxD_CODE)
  489. CONFIGMG_Service (_CONFIGMG_Query_Change_HW_Prof, VxD_CODE)
  490. CONFIGMG_Service (_CONFIGMG_Get_Device_Driver_Private_DWord, VxD_CODE)
  491. CONFIGMG_Service (_CONFIGMG_Set_Device_Driver_Private_DWord, VxD_CODE)
  492. CONFIGMG_Service (_CONFIGMG_Get_HW_Prof_Flags, VxD_CODE)
  493. CONFIGMG_Service (_CONFIGMG_Set_HW_Prof_Flags, VxD_CODE)
  494. CONFIGMG_Service (_CONFIGMG_Read_Registry_Log_Confs, VxD_CODE)
  495. CONFIGMG_Service (_CONFIGMG_Run_Detection, VxD_CODE)
  496. CONFIGMG_Service (_CONFIGMG_Call_At_Appy_Time, VxD_CODE)
  497. CONFIGMG_Service (_CONFIGMG_Fail_Change_HW_Prof, VxD_CODE)
  498. CONFIGMG_Service (_CONFIGMG_Set_Private_Problem, VxD_CODE)
  499. CONFIGMG_Service (_CONFIGMG_Debug_DevNode, VxD_CODE)
  500. CONFIGMG_Service (_CONFIGMG_Get_Hardware_Profile_Info, VxD_CODE)
  501. CONFIGMG_Service (_CONFIGMG_Register_Enumerator_Function, VxD_CODE)
  502. CONFIGMG_Service (_CONFIGMG_Call_Enumerator_Function, VxD_CODE)
  503. CONFIGMG_Service (_CONFIGMG_Add_ID, VxD_CODE)
  504. End_Service_Table(CONFIGMG, VxD)
  505. /*ENDMACROS*/
  506. /*XLATOFF*/
  507. #define NUM_CM_SERVICES ((WORD)(Num_CONFIGMG_Services & 0xFFFF))
  508. #define DEBUG_SERVICE_NAMES 
  509. char CMFAR *lpszServiceName[NUM_CM_SERVICES]= 
  510. "Get_Version", 
  511. "Initialize", 
  512. "Locate_DevNode", 
  513. "Get_Parent", 
  514. "Get_Child", 
  515. "Get_Sibling", 
  516. "Get_Device_ID_Size", 
  517. "Get_Device_ID", 
  518. "Get_Depth", 
  519. "Get_Private_DWord", 
  520. "Set_Private_DWord", 
  521. "Create_DevNode", 
  522. "Query_Remove_SubTree", 
  523. "Remove_SubTree", 
  524. "Register_Device_Driver", 
  525. "Register_Enumerator", 
  526. "Register_Arbitrator", 
  527. "Deregister_Arbitrator", 
  528. "Query_Arbitrator_Free_Size", 
  529. "Query_Arbitrator_Free_Data", 
  530. "Sort_NodeList", 
  531. "Yield", 
  532. "Lock", 
  533. "Unlock", 
  534. "Add_Empty_Log_Conf", 
  535. "Free_Log_Conf", 
  536. "Get_First_Log_Conf", 
  537. "Get_Next_Log_Conf", 
  538. "Add_Res_Des", 
  539. "Modify_Res_Des", 
  540. "Free_Res_Des", 
  541. "Get_Next_Res_Des", 
  542. "Get_Performance_Info", 
  543. "Get_Res_Des_Data_Size", 
  544. "Get_Res_Des_Data", 
  545. "Process_Events_Now", 
  546. "Create_Range_List", 
  547. "Add_Range", 
  548. "Delete_Range", 
  549. "Test_Range_Available", 
  550. "Dup_Range_List", 
  551. "Free_Range_List", 
  552. "Invert_Range_List", 
  553. "Intersect_Range_List", 
  554. "First_Range", 
  555. "Next_Range", 
  556. "Dump_Range_List", 
  557. "Load_DLVxDs", 
  558. "Get_DDBs", 
  559. "Get_CRC_CheckSum", 
  560. "Register_DevLoader", 
  561. "Reenumerate_DevNode", 
  562. "Setup_DevNode", 
  563. "Reset_Children_Marks", 
  564. "Get_DevNode_Status", 
  565. "Remove_Unmarked_Children", 
  566. "ISAPNP_To_CM", 
  567. "CallBack_Device_Driver", 
  568. "CallBack_Enumerator", 
  569. "Get_Alloc_Log_Conf", 
  570. "Get_DevNode_Key_Size", 
  571. "Get_DevNode_Key", 
  572. "Read_Registry_Value", 
  573. "Write_Registry_Value", 
  574. "Disable_DevNode", 
  575. "Enable_DevNode", 
  576. "Move_DevNode", 
  577. "Set_Bus_Info", 
  578. "Get_Bus_Info", 
  579. "Set_HW_Prof", 
  580. "Recompute_HW_Prof", 
  581. "Query_Change_HW_Prof", 
  582. "Get_Device_Driver_Private_DWord", 
  583. "Set_Device_Driver_Private_DWord", 
  584. "Get_HW_Prof_Flags", 
  585. "Set_HW_Prof_Flags", 
  586. "Read_Registry_Log_Confs", 
  587. "Run_Detection", 
  588. "Call_At_Appy_Time", 
  589. "Fail_Change_HW_Prof", 
  590. "Set_Private_Problem", 
  591. "Debug_DevNode", 
  592. "Get_Hardware_Profile_Info", 
  593. "Register_Enumerator_Function", 
  594. "Call_Enumerator_Function", 
  595. "Add_ID", 
  596. };
  597. /*XLATON*/
  598. /****************************************************************************
  599.  *
  600.  * GLOBALLY DEFINED TYPEDEFS
  601.  *
  602.  ***************************************************************************/
  603. typedef RETURN_TYPE CONFIGRET; // Standardized return value.
  604. typedef PPVMMDDB *PPPVMMDDB; // Too long to describe.
  605. typedef VOID CMFAR *PFARVOID; // Pointer to a VOID.
  606. typedef ULONG CMFAR *PFARULONG; // Pointer to a ULONG.
  607. typedef char CMFAR *PFARCHAR; // Pointer to a string.
  608. typedef VMMHKEY CMFAR *PFARHKEY; // Pointer to a HKEY.
  609. typedef char CMFAR *DEVNODEID; // Device ID ANSI name.
  610. typedef DWORD LOG_CONF; // Logical configuration.
  611. typedef LOG_CONF CMFAR *PLOG_CONF; // Pointer to logical configuration.
  612. typedef DWORD RES_DES; // Resource descriptor.
  613. typedef RES_DES CMFAR *PRES_DES; // Pointer to resource descriptor.
  614. typedef DWORD DEVNODE; // Devnode.
  615. typedef DEVNODE CMFAR *PDEVNODE; // Pointer to devnode.
  616. typedef DWORD NODELIST; // Pointer to a nodelist element.
  617. typedef DWORD NODELIST_HEADER;// Pointer to a nodelist header.
  618. typedef DWORD REGISTERID; // Arbitartor registration.
  619. typedef REGISTERID CMFAR *PREGISTERID; // Pointer to arbitartor registration.
  620. typedef ULONG RESOURCEID; // Resource type ID.
  621. typedef RESOURCEID CMFAR *PRESOURCEID; // Pointer to resource type ID.
  622. typedef ULONG PRIORITY; // Priority number.
  623. typedef DWORD RANGE_LIST; // Range list handle.
  624. typedef RANGE_LIST CMFAR *PRANGE_LIST; // Pointer to a range list handle.
  625. typedef DWORD RANGE_ELEMENT; // Range list element handle.
  626. typedef RANGE_ELEMENT CMFAR *PRANGE_ELEMENT;// Pointer to a range element handle.
  627. typedef DWORD LOAD_TYPE; // For the loading function.
  628. typedef CMCONFIG CMFAR *PCMCONFIG; // Pointer to a config buffer info.
  629. typedef DWORD CMBUSTYPE; // Type of the bus.
  630. typedef CMBUSTYPE CMFAR *PCMBUSTYPE; // Pointer to a bus type.
  631. typedef double VMM_TIME; // Time in microticks.
  632. #define LODWORD(x) ((DWORD)(x))
  633. #define HIDWORD(x) (*(PDWORD)(PDWORD(&x)+1))
  634. typedef ULONG CONFIGFUNC;
  635. typedef ULONG SUBCONFIGFUNC;
  636. typedef CONFIGRET (CMFAR _cdecl *CMCONFIGHANDLER)(CONFIGFUNC, SUBCONFIGFUNC, DEVNODE, ULONG, ULONG);
  637. typedef CONFIGRET (CMFAR _cdecl *CMENUMHANDLER)(CONFIGFUNC, SUBCONFIGFUNC, DEVNODE, DEVNODE, ULONG);
  638. typedef VOID (CMFAR _cdecl *CMAPPYCALLBACKHANDLER)(ULONG);
  639. typedef ULONG ENUMFUNC;
  640. typedef CONFIGRET (CMFAR _cdecl *CMENUMFUNCTION)(ENUMFUNC, ULONG, DEVNODE, PFARVOID, ULONG);
  641. typedef ULONG ARBFUNC;
  642. typedef CONFIGRET (CMFAR _cdecl *CMARBHANDLER)(ARBFUNC, ULONG, DEVNODE, NODELIST_HEADER);
  643. /****************************************************************************
  644.  *
  645.  * CONFIGURATION MANAGER BUS TYPE
  646.  *
  647.  ***************************************************************************/
  648. #define BusType_None 0x00000000
  649. #define BusType_ISA 0x00000001
  650. #define BusType_EISA 0x00000002
  651. #define BusType_PCI 0x00000004
  652. #define BusType_PCMCIA 0x00000008
  653. #define BusType_ISAPNP 0x00000010
  654. #define BusType_MCA 0x00000020
  655. /****************************************************************************
  656.  *
  657.  * CONFIGURATION MANAGER RETURN VALUES
  658.  *
  659.  ***************************************************************************/
  660. #define CR_SUCCESS 0x00000000
  661. #define CR_DEFAULT 0x00000001
  662. #define CR_OUT_OF_MEMORY 0x00000002
  663. #define CR_INVALID_POINTER 0x00000003
  664. #define CR_INVALID_FLAG 0x00000004
  665. #define CR_INVALID_DEVNODE 0x00000005
  666. #define CR_INVALID_RES_DES 0x00000006
  667. #define CR_INVALID_LOG_CONF 0x00000007
  668. #define CR_INVALID_ARBITRATOR 0x00000008
  669. #define CR_INVALID_NODELIST 0x00000009
  670. #define CR_DEVNODE_HAS_REQS 0x0000000A
  671. #define CR_INVALID_RESOURCEID 0x0000000B
  672. #define CR_DLVXD_NOT_FOUND 0x0000000C
  673. #define CR_NO_SUCH_DEVNODE 0x0000000D
  674. #define CR_NO_MORE_LOG_CONF 0x0000000E
  675. #define CR_NO_MORE_RES_DES 0x0000000F
  676. #define CR_ALREADY_SUCH_DEVNODE 0x00000010
  677. #define CR_INVALID_RANGE_LIST 0x00000011
  678. #define CR_INVALID_RANGE 0x00000012
  679. #define CR_FAILURE 0x00000013
  680. #define CR_NO_SUCH_LOGICAL_DEV 0x00000014
  681. #define CR_CREATE_BLOCKED 0x00000015
  682. #define CR_NOT_SYSTEM_VM 0x00000016
  683. #define CR_REMOVE_VETOED 0x00000017
  684. #define CR_APM_VETOED 0x00000018
  685. #define CR_INVALID_LOAD_TYPE 0x00000019
  686. #define CR_BUFFER_SMALL 0x0000001A
  687. #define CR_NO_ARBITRATOR 0x0000001B
  688. #define CR_NO_REGISTRY_HANDLE 0x0000001C
  689. #define CR_REGISTRY_ERROR 0x0000001D
  690. #define CR_INVALID_DEVICE_ID 0x0000001E
  691. #define CR_INVALID_DATA 0x0000001F
  692. #define CR_INVALID_API 0x00000020
  693. #define CR_DEVLOADER_NOT_READY 0x00000021
  694. #define CR_NEED_RESTART 0x00000022
  695. #define CR_INTERRUPTS_DISABLED 0x00000023
  696. #define CR_DEVICE_NOT_THERE 0x00000024
  697. #define CR_NO_SUCH_VALUE 0x00000025
  698. #define CR_WRONG_TYPE 0x00000026
  699. #define CR_INVALID_PRIORITY 0x00000027
  700. #define CR_NOT_DISABLEABLE 0x00000028
  701. #define CR_NO_MORE_HW_PROFILES 0x00000029
  702. #define NUM_CR_RESULTS 0x0000002A
  703. /*XLATOFF*/
  704. #define DEBUG_RETURN_CR_NAMES 
  705. char CMFAR *lpszReturnCRName[NUM_CR_RESULTS]= 
  706. "CR_SUCCESS", 
  707. "CR_DEFAULT", 
  708. "CR_OUT_OF_MEMORY", 
  709. "CR_INVALID_POINTER", 
  710. "CR_INVALID_FLAG", 
  711. "CR_INVALID_DEVNODE", 
  712. "CR_INVALID_RES_DES", 
  713. "CR_INVALID_LOG_CONF", 
  714. "CR_INVALID_ARBITRATOR", 
  715. "CR_INVALID_NODELIST", 
  716. "CR_DEVNODE_HAS_REQS", 
  717. "CR_INVALID_RESOURCEID", 
  718. "CR_DLVXD_NOT_FOUND", 
  719. "CR_NO_SUCH_DEVNODE", 
  720. "CR_NO_MORE_LOG_CONF", 
  721. "CR_NO_MORE_RES_DES", 
  722. "CR_ALREADY_SUCH_DEVNODE", 
  723. "CR_INVALID_RANGE_LIST", 
  724. "CR_INVALID_RANGE", 
  725. "CR_FAILURE", 
  726. "CR_NO_SUCH_LOGICAL_DEVICE", 
  727. "CR_CREATE_BLOCKED", 
  728. "CR_NOT_SYSTEM_VM", 
  729. "CR_REMOVE_VETOED", 
  730. "CR_APM_VETOED", 
  731. "CR_INVALID_LOAD_TYPE", 
  732. "CR_BUFFER_SMALL", 
  733. "CR_NO_ARBITRATOR", 
  734. "CR_NO_REGISTRY_HANDLE", 
  735. "CR_REGISTRY_ERROR", 
  736. "CR_INVALID_DEVICE_ID", 
  737. "CR_INVALID_DATA", 
  738. "CR_INVALID_API", 
  739. "CR_DEVLOADER_NOT_READY", 
  740. "CR_NEED_RESTART", 
  741. "CR_INTERRUPTS_DISABLED", 
  742. "CR_DEVICE_NOT_THERE", 
  743. "CR_NO_SUCH_VALUE", 
  744. "CR_WRONG_TYPE", 
  745. "CR_INVALID_PRIORITY", 
  746. "CR_NOT_DISABLEABLE", 
  747. "CR_NO_MORE_HW_PROFILES", 
  748. };
  749. /*XLATON*/
  750. #define CM_PROB_NOT_CONFIGURED 0x00000001
  751. #define CM_PROB_DEVLOADER_FAILED 0x00000002
  752. #define CM_PROB_OUT_OF_MEMORY 0x00000003
  753. #define CM_PROB_ENTRY_IS_WRONG_TYPE 0x00000004
  754. #define CM_PROB_LACKED_ARBITRATOR 0x00000005
  755. #define CM_PROB_BOOT_CONFIG_CONFLICT 0x00000006
  756. #define CM_PROB_FAILED_FILTER 0x00000007
  757. #define CM_PROB_DEVLOADER_NOT_FOUND 0x00000008
  758. #define CM_PROB_INVALID_DATA 0x00000009
  759. #define CM_PROB_FAILED_START 0x0000000A
  760. #define CM_PROB_LIAR 0x0000000B
  761. #define CM_PROB_NORMAL_CONFLICT 0x0000000C
  762. #define CM_PROB_NOT_VERIFIED 0x0000000D
  763. #define CM_PROB_NEED_RESTART 0x0000000E
  764. #define CM_PROB_REENUMERATION 0x0000000F
  765. #define CM_PROB_PARTIAL_LOG_CONF 0x00000010
  766. #define CM_PROB_UNKNOWN_RESOURCE 0x00000011
  767. #define CM_PROB_REINSTALL 0x00000012
  768. #define CM_PROB_REGISTRY 0x00000013
  769. #define CM_PROB_VXDLDR 0x00000014
  770. #define CM_PROB_WILL_BE_REMOVED 0x00000015
  771. #define CM_PROB_DISABLED 0x00000016
  772. #define CM_PROB_DEVLOADER_NOT_READY 0x00000017
  773. #define CM_PROB_DEVICE_NOT_THERE 0x00000018
  774. #define CM_PROB_MOVED 0x00000019
  775. #define CM_PROB_TOO_EARLY 0x0000001A
  776. #define CM_PROB_NO_VALID_LOG_CONF 0x0000001B
  777. #define NUM_CM_PROB 0x0000001C
  778. /*XLATOFF*/
  779. #define DEBUG_CM_PROB_NAMES 
  780. char CMFAR *lpszCMProbName[NUM_CM_PROB]= 
  781. "No Problem", 
  782. "No ConfigFlags (not configured)", 
  783. "Devloader failed", 
  784. "Run out of memory", 
  785. "Devloader/StaticVxD/Configured is of wrong type", 
  786. "Lacked an arbitrator", 
  787. "Boot config conflicted", 
  788. "Filtering failed", 
  789. "Devloader not found", 
  790. "Invalid data in registry", 
  791. "Device failed to start", 
  792. "Device failed something not failable", 
  793. "Was normal conflicting", 
  794. "Did not verified", 
  795. "Need restart", 
  796. "Is probably reenumeration", 
  797. "Was not fully detected", 
  798. "Resource number was not found", 
  799. "Reinstall", 
  800. "Registry returned unknown result", 
  801. "VxDLdr returned unknown result", 
  802. "Will be removed", 
  803. "Disabled", 
  804. "Devloader was not ready", 
  805. "Device not there", 
  806. "Was moved", 
  807. "Too early", 
  808. "No valid log conf", 
  809. };
  810. /*XLATON*/
  811. #define CM_INITIALIZE_VMM 0x00000000
  812. #define CM_INITIALIZE_VXDLDR 0x00000001
  813. #define CM_INITIALIZE_BITS 0x00000001
  814. #define CM_YIELD_NO_RESUME_EXEC 0x00000000
  815. #define CM_YIELD_RESUME_EXEC 0x00000001
  816. #define CM_YIELD_BITS 0x00000001
  817. #define CM_CREATE_DEVNODE_NORMAL 0x00000000
  818. #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
  819. #define CM_CREATE_DEVNODE_BITS 0x00000001
  820. #define CM_REGISTER_DEVICE_DRIVER_STATIC 0x00000000
  821. #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE 0x00000001
  822. #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE 0x00000002
  823. #define CM_REGISTER_DEVICE_DRIVER_BITS 0x00000003
  824. #define CM_REGISTER_ENUMERATOR_SOFTWARE 0x00000000
  825. #define CM_REGISTER_ENUMERATOR_HARDWARE 0x00000001
  826. #define CM_REGISTER_ENUMERATOR_BITS 0x00000001
  827. #define CM_SETUP_DEVNODE_READY 0x00000000
  828. #define CM_SETUP_DOWNLOAD 0x00000001
  829. #define CM_SETUP_BITS 0x00000001
  830. #define CM_ADD_RANGE_ADDIFCONFLICT 0x00000000
  831. #define CM_ADD_RANGE_DONOTADDIFCONFLICT 0x00000001
  832. #define CM_ADD_RANGE_BITS 0x00000001
  833. #define CM_ISAPNP_ADD_RES_DES 0x00000000
  834. #define CM_ISAPNP_SETUP 0x00000001
  835. #define CM_ISAPNP_ADD_BOOT_RES_DES 0x00000002
  836. #define CM_ISAPNP_INVALID 0x00000003
  837. #define CM_ISAPNP_BITS 0x00000003
  838. #define CM_GET_PERFORMANCE_INFO_DATA 0x00000000
  839. #define CM_GET_PERFORMANCE_INFO_RESET 0x00000001
  840. #define CM_GET_PERFORMANCE_INFO_START 0x00000002
  841. #define CM_GET_PERFORMANCE_INFO_STOP 0x00000003
  842. #define CM_RESET_HIT_DATA 0x00000004
  843. #define CM_GET_HIT_DATA  0x00000005
  844. #define CM_GET_PERFORMANCE_INFO_BITS 0x0000000F
  845. #define CM_HIT_DATA_FILES 0xFFFF0000
  846. #define CM_HIT_DATA_SIZE ((256*8)+8)  // magic number!
  847. #define CM_GET_ALLOC_LOG_CONF_ALLOC 0x00000000
  848. #define CM_GET_ALLOC_LOG_CONF_BOOT_ALLOC 0x00000001
  849. #define CM_GET_ALLOC_LOG_CONF_BITS 0x00000001
  850. #define CM_REGISTRY_HARDWARE 0x00000000 // Select hardware branch if NULL subkey
  851. #define CM_REGISTRY_SOFTWARE 0x00000001 // Select software branch if NULL subkey
  852. #define CM_REGISTRY_USER 0x00000100 // Use HKEY_CURRENT_USER
  853. #define CM_REGISTRY_CONFIG 0x00000200 // Use HKEY_CURRENT_CONFIG
  854. #define CM_REGISTRY_BITS 0x00000301 // The bits for the registry functions
  855. #define CM_DISABLE_POLITE 0x00000000 // Ask the driver
  856. #define CM_DISABLE_ABSOLUTE 0x00000001 // Don't ask the driver
  857. #define CM_DISABLE_BITS 0x00000001 // The bits for the disable function
  858. #define CM_HW_PROF_UNDOCK 0x00000000 // Computer not in a dock.
  859. #define CM_HW_PROF_DOCK 0x00000001 // Computer in a docking station
  860. #define CM_HW_PROF_RECOMPUTE_BITS 0x00000001 // RecomputeConfig
  861. #define CM_HW_PROF_DOCK_KNOWN 0x00000002 // Computer in a known docking station
  862. #define CM_HW_PROF_QUERY_CHANGE_BITS 0x00000003 // QueryChangeConfig
  863. #define CM_DETECT_NEW_PROFILE 0x00000001 // run detect for a new profile
  864. #define CM_DETECT_CRASHED 0x00000002 // detection crashed before
  865. #define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004 // first boot in a new profile
  866. #define CM_DETECT_RUN 0x80000000 // run detection for new hardware
  867. #define CM_ADD_ID_HARDWARE 0x00000000
  868. #define CM_ADD_ID_COMPATIBLE 0x00000001
  869. #define CM_ADD_ID_BITS 0x00000001
  870. #define CM_REENUMERATE_NORMAL 0x00000000
  871. #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
  872. #define CM_REENUMERATE_BITS 0x00000001
  873. /****************************************************************************
  874.  *
  875.  * CONFIGURATION MANAGER FUNCTIONS
  876.  *
  877.  ****************************************************************************
  878.  *
  879.  * Each devnode has a config handler field and a enum handler field
  880.  * which are getting called every time Configuration Manager wants a
  881.  * devnode to perform some configuration related function. The handler
  882.  * is registered with CM_Register_Device_Driver or
  883.  * CM_Register_Enumerator, depending if the handler is for the device
  884.  * itself or for one of the children of the devnode.
  885.  *
  886.  * The registered handler is called with:
  887.  *
  888.  * result=dnToDevNode->dn_Config(if dnToDevNode==dnAboutDevNode)
  889.  * result=dnToDevNode->dn_Enum(if dnToDevNode!=dnAboutDevNode)
  890.  * ( FuncName,
  891.  *   SubFuncName,
  892.  * dnToDevNode,
  893.  * dnAboutDevNode, (if enum)
  894.  * dwRefData, (if driver)
  895.  * ulFlags);
  896.  * Where:
  897.  *
  898.  * FuncName is one of CONFIG_FILTER, CONFIG_START, CONFIG_STOP,
  899.  * CONFIG_TEST, CONFIG_REMOVE, CONFIG_ENUMERATE, CONFIG_SETUP or
  900.  * CONFIG_CALLBACK.
  901.  *
  902.  * SubFuncName is the specific CONFIG_xxxx_* that further describe
  903.  * we START, STOP or TEST.
  904.  *
  905.  * dnToDevNode is the devnode we are calling. This is given so that
  906.  * a signle handler can handle multiple devnodes.
  907.  *
  908.  * dnAboutDevNode specifies which devnode the function is about. For
  909.  * a config handler, this is necessarily the same as dnToDevNode. For
  910.  * an enumerator handler, this devnode is necessarily different as it
  911.  * is a child of the dnToDevNode (special case: CONFIG_ENUMERATE
  912.  * necessarily has dnAboutDevNode==NULL). For instance, when starting
  913.  * a COM devnode under a BIOS enumerator, we would make the following
  914.  * two calls:
  915.  *
  916.  * To BIOS with (CONFIG_START, ?, BIOS, COM, ?, 0).
  917.  *
  918.  * To COM with (CONFIG_START, ?, COM, COM, ?, 0).
  919.  *
  920.  * dwRefData is a dword of reference data. For a config handler, it is
  921.  * the DWORD passed on the CONFIGMG_Register_Device_Driver call. For an
  922.  * enumerator, it is the same as CONFIGMG_Get_Private_DWord(?,
  923.  * dnToDevNode, dnToDevNode, 0).
  924.  *
  925.  * ulFlags is 0 and is reserved for future extensions.
  926.  *
  927.  * Here is the explanation of each event, in parenthesis I put the
  928.  * order the devnodes will be called:
  929.  *
  930.  * CONFIG_FILTER (BRANCH GOING UP) is the first thing called when a new
  931.  * insertion or change of configuration need to be processed. First
  932.  * CM copies the requirement list (BASIC_LOG_CONF) onto the filtered
  933.  * requirement list (FILTER_LOG_CONF) so that they are originally
  934.  * the same. CM then calls every node up, giving them the chance to
  935.  * patch the requirement of the dnAboutDevNode (they can also
  936.  * alter their own requirement). Examples are PCMCIA which would
  937.  * remove some IRQ that the adapter can't do, prealloc some IO
  938.  * windows and memory windows. ISA which would limit address space
  939.  * to being <16Meg. A device driver should look only at
  940.  * FILTER_LOG_CONF during this call.
  941.  *
  942.  * CONFIG_START (BRANCH GOING DOWN) are called to change the
  943.  * configuration. A config handler/enumerator hander should look
  944.  * only at the allocated list (ALLOC_LOG_CONF).
  945.  *
  946.  * CONFIG_STOP (WHOLE TREE BUT ONLY DEVNODES THAT CHANGE
  947.  * CONFIGURATION (FOR EACH DEVNODE, BRANCH GOING UP)) is called
  948.  * for two reasons:
  949.  *
  950.  * 1) Just after the rebalance algorithm came up with a
  951.  * solution and we want to stop all devnodes that will be
  952.  * rebalance. This is to avoid the problem of having two cards
  953.  * that can respond to 110h and 220h and that need to toggle
  954.  * their usage. We do not want two people responding to 220h,
  955.  * even for a brief amount of time. This is the normal call
  956.  * though.
  957.  *
  958.  * 2) There was a conflict and the user selected this device
  959.  * to kill.
  960.  *
  961.  * CONFIG_TEST (WHOLE TREE) is called before starting the rebalance
  962.  * algorithm. Device drivers that fail this call will be considered
  963.  * worst than jumpered configured for the reminder of this balancing
  964.  * process.
  965.  *
  966.  * CONFIG_REMOVE (FOR EACH SUB TREE NODE, DOING BRANCH GOING UP), is
  967.  * called when someone notify CM via CM_Remove_SubTree that a devnode
  968.  * is not needed anymore. A static VxD probably has nothing to do. A
  969.  * dynamic VxD should check whether it should unload itself (return
  970.  * CR_SUCCESS_UNLOAD) or not (CR_SUCCESS).
  971.  *
  972.  * Note, failing any of CONFIG_START, or CONFIG_STOP is really bad,
  973.  * both in terms of performance and stability. Requirements for a
  974.  * configuration to succeed should be noted/preallocated during
  975.  * CONFIG_FILTER. Failing CONFIG_TEST is less bad as what basically
  976.  * happens is that the devnode is considered worst than jumpered
  977.  * configured for the reminder of this pass of the balancing algorithm.
  978.  *
  979.  * COMFIG_ENUMERATE, the called node should create children devnodes
  980.  * using CM_Create_DevNode (but no need for grand children) and remove
  981.  * children using CM_Remove_SubTree as appropriate. Config Manager
  982.  * will recurse calling the children until nothing new appears. During
  983.  * this call, dnAboutDevNode will be NULL. Note that there is an easy
  984.  * way for buses which do not have direct children accessibility to
  985.  * detect (ISAPNP for instance will isolate one board at a time and
  986.  * there is no way to tell one specific board not to participate in
  987.  * the isolation sequence):
  988.  *
  989.  * If some children have soft-eject capability, check those first.
  990.  * If the user is pressing the eject button, call Query_Remove_SubTree
  991.  * and if that succeed, call Remove_SubTree.
  992.  *
  993.  * Do a CM_Reset_Children_Marks on the bus devnode.
  994.  *
  995.  * Do the usual sequence doing CM_Create_DevNode calls. If a devnode
  996.  * was already there, CR_ALREADY_SUCH_DEVNODE is returned and this
  997.  * devnode's DN_HAS_MARK will be set. There is nothing more to do with
  998.  * this devnode has it should just continue running. If the devnode
  999.  * was not previously there, CR_SUCCESS will be return, in which case
  1000.  * the enumerator should add the logical configurations.
  1001.  *
  1002.  * Once all the devnode got created. The enumerator can call
  1003.  * CM_Remove_Unmarked_Children to remove the devnode that are now gone.
  1004.  * Essentially, this is a for loop thru all the children of the bus
  1005.  * devnode, doing Remove_SubTree on the the devnode which have their
  1006.  * mark cleared. Alternatively, an enumerator can use CM_Get_Child,
  1007.  * CM_Get_Sibling, CM_Remove_SubTree and CM_Get_DevNode_Status.
  1008.  *
  1009.  * For CONFIG_SETUP, the called node should install drivers if it
  1010.  * know out to get them. This is mostly for drivers imbeded in the
  1011.  * cards (ISA_RTR, PCI or PCMCIA). For most old cards/driver, this
  1012.  * should return CR_NO_DRIVER.
  1013.  *
  1014.  * WARNING: For any non-defined service, the enumertor / device
  1015.  * driver handler should return CR_DEFAULT. This will be treated
  1016.  * as the compatibility case in future version.
  1017.  *
  1018.  * So normally what happens is as follows:
  1019.  *
  1020.  * - Some detection code realize there is a new device. This can be at
  1021.  * initialization time or at run-time (usually during a media_change
  1022.  * interrupt). The code does a CM_Reenumerate_DevNode(dnBusDevNode)
  1023.  * asynchronous call.
  1024.  *
  1025.  * - During appy time event, CM gets notified.
  1026.  *
  1027.  * - CM calls the enumerator with:
  1028.  *
  1029.  * BusEnumHandler(CONFIG_ENUMERATE, 0, dnBusDevNode, NULL, ?, 0);
  1030.  *
  1031.  * - The parent uses CM_Create_DevNode and CM_Remove_SubTree as
  1032.  * appropriate, usually for only its immediate children.
  1033.  *
  1034.  * - The parent return to CM from the enumerator call.
  1035.  *
  1036.  * - CM walks the children, first loading their device driver if
  1037.  * needed, then calling their enumerators. Thus the whole process
  1038.  * will terminate only when all grand-...-grand-children have stopped
  1039.  * using CM_Create_DevNode.
  1040.  *
  1041.  * If rebalance is called (a new devnode is conflicting):
  1042.  *
  1043.  * - All devnode receives the CONFIG_TEST. Devnodes that
  1044.  * fail it are considered worst than jumpered configured.
  1045.  *
  1046.  * - CM does the rebalance algorithm.
  1047.  *
  1048.  * - All affected devnodes that where previously loaded get the
  1049.  * CONFIG_STOP event.
  1050.  *
  1051.  * - All affected devnode and the new devnodes receives a CONFIG_START.
  1052.  *
  1053.  * If rebalancing failed (couldn't make one or more devnodes work):
  1054.  *
  1055.  * - Device installer is called which will present the user with a
  1056.  * choice of devnode to kill.
  1057.  *
  1058.  * - Those devnodes will received a CONFIG_STOP message.
  1059.  *
  1060.  ***************************************************************************/
  1061. // Possible CONFIGFUNC FuncNames:
  1062. #define CONFIG_FILTER 0x00000000 // Ancestors must filter requirements.
  1063. #define CONFIG_START 0x00000001 // Devnode dynamic initialization.
  1064. #define CONFIG_STOP 0x00000002 // Devnode must stop using config.
  1065. #define CONFIG_TEST 0x00000003 // Can devnode change state now.
  1066. #define CONFIG_REMOVE 0x00000004 // Devnode must stop using config.
  1067. #define CONFIG_ENUMERATE 0x00000005 // Devnode must enumerated.
  1068. #define CONFIG_SETUP 0x00000006 // Devnode should download driver.
  1069. #define CONFIG_CALLBACK 0x00000007 // Devnode is being called back.
  1070. #define CONFIG_APM 0x00000008 // APM functions.
  1071. #define CONFIG_TEST_FAILED 0x00000009 // Continue as before after a TEST.
  1072. #define CONFIG_TEST_SUCCEEDED 0x0000000A // Prepare for the STOP/REMOVE.
  1073. #define CONFIG_VERIFY_DEVICE 0x0000000B // Insure the legacy card is there.
  1074. #define CONFIG_PREREMOVE 0x0000000C // Devnode must stop using config.
  1075. #define CONFIG_SHUTDOWN 0x0000000D // We are shutting down.
  1076. #define CONFIG_PREREMOVE2 0x0000000E // Devnode must stop using config.
  1077. #define CONFIG_READY 0x0000000F // The devnode has been setup.
  1078. #define NUM_CONFIG_COMMANDS 0x00000010 // For DEBUG.
  1079. /*XLATOFF*/
  1080. #define DEBUG_CONFIG_NAMES 
  1081. char CMFAR *lpszConfigName[NUM_CONFIG_COMMANDS]= 
  1082. "CONFIG_FILTER", 
  1083. "CONFIG_START", 
  1084. "CONFIG_STOP", 
  1085. "CONFIG_TEST", 
  1086. "CONFIG_REMOVE", 
  1087. "CONFIG_ENUMERATE", 
  1088. "CONFIG_SETUP", 
  1089. "CONFIG_CALLBACK", 
  1090. "CONFIG_APM", 
  1091. "CONFIG_TEST_FAILED", 
  1092. "CONFIG_TEST_SUCCEEDED", 
  1093. "CONFIG_VERIFY_DEVICE", 
  1094. "CONFIG_PREREMOVE", 
  1095. "CONFIG_SHUTDOWN", 
  1096. "CONFIG_PREREMOVE2", 
  1097. "CONFIG_READY", 
  1098. };
  1099. /*XLATON*/
  1100. // Possible SUBCONFIGFUNC SubFuncNames:
  1101. #define CONFIG_START_DYNAMIC_START 0x00000000
  1102. #define CONFIG_START_FIRST_START 0x00000001
  1103. #define CONFIG_STOP_DYNAMIC_STOP 0x00000000
  1104. #define CONFIG_STOP_HAS_PROBLEM 0x00000001
  1105. //
  1106. // For both CONFIG_REMOVE and CONFIG_POSTREMOVE
  1107. //
  1108. #define CONFIG_REMOVE_DYNAMIC 0x00000000
  1109. #define CONFIG_REMOVE_SHUTDOWN 0x00000001
  1110. #define CONFIG_REMOVE_REBOOT 0x00000002
  1111. #define CONFIG_TEST_CAN_STOP 0x00000000
  1112. #define CONFIG_TEST_CAN_REMOVE 0x00000001
  1113. #define CONFIG_APM_TEST_STANDBY 0x00000000
  1114. #define CONFIG_APM_TEST_SUSPEND 0x00000001
  1115. #define CONFIG_APM_TEST_STANDBY_FAILED 0x00000002
  1116. #define CONFIG_APM_TEST_SUSPEND_FAILED 0x00000003
  1117. #define CONFIG_APM_TEST_STANDBY_SUCCEEDED 0x00000004
  1118. #define CONFIG_APM_TEST_SUSPEND_SUCCEEDED 0x00000005
  1119. #define CONFIG_APM_RESUME_STANDBY 0x00000006
  1120. #define CONFIG_APM_RESUME_SUSPEND 0x00000007
  1121. #define CONFIG_APM_RESUME_CRITICAL 0x00000008
  1122. #define CONFIG_APM_UI_ALLOWED                   0x80000000
  1123. /****************************************************************************
  1124.  *
  1125.  * ARBITRATOR FUNCTIONS
  1126.  *
  1127.  ****************************************************************************
  1128.  *
  1129.  * Each arbitrator has a handler field which is getting called every
  1130.  * time Configuration Manager wants it to perform a function. The
  1131.  * handler is called with:
  1132.  *
  1133.  * result=paArbitrator->Arbitrate( EventName,
  1134.  * paArbitrator->DWordToBePassed,
  1135.  * paArbitrator->dnItsDevNode,
  1136.  * pnlhNodeListHeader);
  1137.  *
  1138.  * ENTRY: NodeListHeader contains a logical configuration for all
  1139.  * devices the configuration manager would like to reconfigure.
  1140.  * DWordToBePassed is the arbitrator reference data.
  1141.  * ItsDevNode is the pointer to arbitrator's devnode.
  1142.  * EventName is one of the following:
  1143.  *
  1144.  * ARB_TEST_ALLOC - Test allocation of resource
  1145.  *
  1146.  * DESC: The arbitration routine will attempt to satisfy all
  1147.  * allocation requests contained in the nodelist for its
  1148.  * resource. See individual arbitrator for the algorithm
  1149.  * employed. Generally, the arbitration consists
  1150.  * of sorting the list according to most likely succesful
  1151.  * allocation order, making a copy of the current allocation
  1152.  * data strucuture(s), releasing all resource currently
  1153.  * allocated to devnodes on the list from the copy data structure
  1154.  * and then attempting to satisfy allocation requests
  1155.  * by passing through the entire list, trying all possible
  1156.  * combinations of allocations before failing. The arbitrator
  1157.  * saves the resultant successful allocations, both in the node
  1158.  * list per device and the copy of the allocation data structure.
  1159.  * The configuration manager is expected to subsequently call
  1160.  * either ARB_SET_ALLOC or ARB_RELEASE_ALLOC.
  1161.  *
  1162.  * EXIT: CR_SUCCESS if successful allocation
  1163.  * CR_FAILURE if unsuccessful allocation
  1164.  * CR_OUT_OF_MEMORY if not enough memory.
  1165.  *
  1166.  * ARB_RETEST_ALLOC - Retest allocation of resource
  1167.  *
  1168.  * DESC: The arbitration routine will attempt to satisfy all
  1169.  * allocation requests contained in the nodelist for its
  1170.  * resource. It will take the result of a previous TEST_ALLOC
  1171.  * and attempt to allocate that resource for each allcoation in
  1172.  * the list. It will not sort the node list. It will make a copy
  1173.  * of the current allocation data strucuture(s), release all
  1174.  * resource currently allocated to devnodes on the list from
  1175.  * the copy data structure and then attempt to satisfy the
  1176.  * allocations from the previous TEST_ALLOC. The arbitrator
  1177.  * saves the resultant copy of the allocation data structure.
  1178.  * The configuration manager is expected to subsequently call
  1179.  * either ARB_SET_ALLOC or ARB_RELEASE_ALLOC.
  1180.  *
  1181.  * EXIT: CR_SUCCESS if successful allocation
  1182.  * CR_FAILURE if unsuccessful allocation
  1183.  * CR_OUT_OF_MEMORY if not enough memory.
  1184.  *
  1185.  * ARB_FORCE_ALLOC - Retest allocation of resource, always succeed
  1186.  *
  1187.  * DESC: The arbitration routine will satisfy all
  1188.  * allocation requests contained in the nodelist for its
  1189.  * resource. It will take the result of a previous TEST_ALLOC
  1190.  * and allocate that resource for each allocation in
  1191.  * the list. It will not sort the node list. It will make a copy
  1192.  * of the current allocation data strucuture(s), release all
  1193.  * resource currently allocated to devnodes on the list from
  1194.  * the copy data structure and then satisfy the
  1195.  * allocations from the previous TEST_ALLOC. The arbitrator
  1196.  * saves the resultant copy of the allocation data structure.
  1197.  * The configuration manager is expected to subsequently call
  1198.  * either ARB_SET_ALLOC or ARB_RELEASE_ALLOC.
  1199.  *
  1200.  * EXIT: CR_SUCCESS if successful allocation
  1201.  * CR_OUT_OF_MEMORY if not enough memory.
  1202.  *
  1203.  * ARB_SET_ALLOC - Makes a test allocation the real allocation
  1204.  *
  1205.  * DESC: Makes the copy of the allocation data structure the
  1206.  * current valid allocation.
  1207.  *
  1208.  * EXIT: CR_SUCCESS
  1209.  *
  1210.  * ARB_RELEASE_ALLOC - Clean up after failed test allocation
  1211.  *
  1212.  * DESC: Free all allocation that were allocated by the previous
  1213.  * ARB_TEST_ALLOC.
  1214.  *
  1215.  * EXIT: CR_SUCCESS
  1216.  *
  1217.  * ARB_QUERY_FREE - Add all free resource logical configuration
  1218.  *
  1219.  * DESC: Return resource specific data on the free element. Note
  1220.  * than the pnlhNodeListHeader is a cast of an arbitfree_s.
  1221.  *
  1222.  * EXIT: CR_SUCCESS if successful
  1223.  * CR_FAILURE if the request makles no sense.
  1224.  * CR_OUT_OF_MEMORY if not enough memory.
  1225.  *
  1226.  * ARB_REMOVE - The devnode the arbitrator registered with is going away
  1227.  *
  1228.  * DESC: Arbitrator registered with a non-NULL devnode (thus is
  1229.  * normally local), and the devnode is being removed. Arbitrator
  1230.  * should do appropriate cleanup.
  1231.  *
  1232.  * EXIT: CR_SUCCESS
  1233.  *
  1234.  * WARNING: For any non-defined service, the arbitrator should return
  1235.  * CR_DEFAULT. This will be treated as the compatibility case in future
  1236.  * version.
  1237.  *
  1238.  ***************************************************************************/
  1239. #define ARB_TEST_ALLOC 0x00000000 // Check if can make alloc works.
  1240. #define ARB_RETEST_ALLOC 0x00000001 // Check if can take previous alloc.
  1241. #define ARB_SET_ALLOC 0x00000002 // Set the tested allocation.
  1242. #define ARB_RELEASE_ALLOC 0x00000003 // Release the tested allocation.
  1243. #define ARB_QUERY_FREE 0x00000004 // Return free resource.
  1244. #define ARB_REMOVE 0x00000005 // DevNode is gone.
  1245. #define ARB_FORCE_ALLOC 0x00000006 // Force previous TEST_ALLOC
  1246. #define NUM_ARB_COMMANDS 0x00000007 // Number of arb commands
  1247. #define DEBUG_ARB_NAMES 
  1248. char CMFAR *lpszArbFuncName[NUM_ARB_COMMANDS]= 
  1249. "ARB_TEST_ALLOC",
  1250. "ARB_RETEST_ALLOC",
  1251. "ARB_SET_ALLOC",
  1252. "ARB_RELEASE_ALLOC",
  1253. "ARB_QUERY_FREE",
  1254. "ARB_REMOVE",
  1255. "ARB_FORCE_ALLOC",
  1256. };
  1257. /****************************************************************************
  1258.  *
  1259.  * DEVNODE STATUS
  1260.  *
  1261.  ****************************************************************************
  1262.  *
  1263.  * These are the bits in the devnode's status that someone can query
  1264.  * with a CM_Get_DevNode_Status. The A/S column tells wheter the flag
  1265.  * cann be change asynchronously or not.
  1266.  *
  1267.  ***************************************************************************/
  1268. #define DN_ROOT_ENUMERATED 0x00000001 // S: Was enumerated by ROOT
  1269. #define DN_DRIVER_LOADED 0x00000002 // S: Has Register_Device_Driver
  1270. #define DN_ENUM_LOADED 0x00000004 // S: Has Register_Enumerator
  1271. #define DN_STARTED 0x00000008 // S: Is currently configured
  1272. #define DN_MANUAL 0x00000010 // S: Manually installed
  1273. #define DN_NEED_TO_ENUM 0x00000020 // A: May need reenumeration
  1274. #define DN_NOT_FIRST_TIME 0x00000040 // S: Has received a config
  1275. #define DN_HARDWARE_ENUM 0x00000080 // S: Enum generates hardware ID
  1276. #define DN_LIAR  0x00000100 // S: Lied about can reconfig once
  1277. #define DN_HAS_MARK 0x00000200 // S: Not CM_Create_DevNode lately
  1278. #define DN_HAS_PROBLEM 0x00000400 // S: Need device installer
  1279. #define DN_FILTERED 0x00000800 // S: Is filtered
  1280. #define DN_MOVED 0x00001000 // S: Has been moved
  1281. #define DN_DISABLEABLE 0x00002000 // S: Can be rebalanced
  1282. #define DN_REMOVABLE 0x00004000 // S: Can be removed
  1283. #define DN_PRIVATE_PROBLEM 0x00008000 // S: Has a private problem
  1284. #define DN_MF_PARENT 0x00010000 // S: Multi function parent
  1285. #define DN_MF_CHILD 0x00020000 // S: Multi function child
  1286. #define DN_WILL_BE_REMOVED 0x00040000 // S: Devnode is being removed
  1287. /*XLATOFF*/
  1288. #define NUM_DN_FLAG 0x00000013 // DEBUG: maximum flag (number)
  1289. #define DN_FLAG_LEN 0x00000002 // DEBUG: flag length
  1290. #define DEBUG_DN_FLAGS_NAMES 
  1291. char CMFAR lpszDNFlagsName[NUM_DN_FLAG][DN_FLAG_LEN]= 
  1292. "rt", 
  1293. "dl", 
  1294. "el", 
  1295. "st", 
  1296. "mn", 
  1297. "ne", 
  1298. "fs", 
  1299. "hw", 
  1300. "lr", 
  1301. "mk", 
  1302. "pb", 
  1303. "ft", 
  1304. "mv", 
  1305. "db", 
  1306. "rb", 
  1307. "pp", 
  1308. "mp", 
  1309. "mc", 
  1310. "rm", 
  1311. };
  1312. struct vmmtime_s {
  1313. DWORD vmmtime_lo;
  1314. DWORD vmmtime_hi;
  1315. };
  1316. typedef struct vmmtime_s VMMTIME;
  1317. typedef VMMTIME *PVMMTIME;
  1318. struct cmtime_s {
  1319. DWORD dwAPICount;
  1320. VMMTIME vtAPITime;
  1321. };
  1322. typedef struct cmtime_s CMTIME;
  1323. typedef CMTIME *PCMTIME;
  1324. struct cm_performance_info_s {
  1325. CMTIME ctBoot;
  1326. CMTIME ctAPI[NUM_CM_SERVICES];
  1327. CMTIME ctRing3;
  1328. CMTIME ctProcessTree;
  1329. CMTIME ctAssignResources;
  1330. CMTIME ctSort;
  1331. CMTIME ctRegistry;
  1332. CMTIME ctVxDLdr;
  1333. CMTIME ctNewDevNode;
  1334. CMTIME ctSendMessage;
  1335. CMTIME ctShell;
  1336. CMTIME ctReceiveMessage;
  1337. CMTIME ctAppyTime;
  1338. CMTIME ctConfigMessage[NUM_CONFIG_COMMANDS];
  1339. CMTIME ctArbTime[ResType_Max+1][NUM_ARB_COMMANDS];
  1340. DWORD dwStackSize;
  1341. DWORD dwMaxProcessTreePasses;
  1342. DWORD dwStackAlloc;
  1343. };
  1344. typedef struct cm_performance_info_s CMPERFINFO;
  1345. typedef CMPERFINFO CMFAR *PCMPERFINFO;
  1346. /*XLATON*/
  1347. /****************************************************************************
  1348.  *
  1349.  * DLVXD FUNCTIONS
  1350.  *
  1351.  ****************************************************************************
  1352.  *
  1353.  * We load a Dynamically loaded VxD when there is a DEVLOADER=... line
  1354.  * in the registry, or when someone calls CM_Load_Device. We then do
  1355.  * a direct system control call (PNP_NEW_DEVNODE) to it, telling the
  1356.  * DLVXD whether we loaded it to be an enumerator, a driver or a
  1357.  * devloader (config manager does only deal with devloaders, but the
  1358.  * default devloaders does CM_Load_Device with DLVXD_LOAD_ENUMERATOR
  1359.  * and DLVXD_LOAD_DRIVER).
  1360.  *
  1361.  ***************************************************************************/
  1362. #define DLVXD_LOAD_ENUMERATOR 0x00000000 // We loaded DLVxD as an enumerator.
  1363. #define DLVXD_LOAD_DEVLOADER 0x00000001 // We loaded DLVxD as a devloader.
  1364. #define DLVXD_LOAD_DRIVER 0x00000002 // We loaded DLVxD as a device driver.
  1365. #define NUM_DLVXD_LOAD_TYPE 0x00000003 // Number of DLVxD load type.
  1366. /****************************************************************************
  1367.  *
  1368.  * GLOBALLY DEFINED FLAGS
  1369.  *
  1370.  ***************************************************************************/
  1371. #define ARB_GLOBAL 0x00000001 // Arbitrator is global.
  1372. #define ARB_LOCAL 0x00000000 // Arbitrator is local.
  1373. #define ARB_SCOPE_BIT 0x00000001 // Arbitrator is global/local bit.
  1374. #define BASIC_LOG_CONF 0x00000000 // Specifies the req list.
  1375. #define FILTERED_LOG_CONF 0x00000001 // Specifies the filtered req list.
  1376. #define ALLOC_LOG_CONF 0x00000002 // Specifies the Alloc Element.
  1377. #define BOOT_LOG_CONF 0x00000003 // Specifies the RM Alloc Element.
  1378. #define FORCED_LOG_CONF 0x00000004 // Specifies the Forced Log Conf
  1379. #define NUM_LOG_CONF 0x00000005 // Number of Log Conf type
  1380. #define LOG_CONF_BITS 0x00000007 // The bits of the log conf type.
  1381. #define DEBUG_LOG_CONF_NAMES 
  1382. char CMFAR *lpszLogConfName[NUM_LOG_CONF]= 
  1383. "BASIC_LOG_CONF",
  1384. "FILTERED_LOG_CONF",
  1385. "ALLOC_LOG_CONF",
  1386. "BOOT_LOG_CONF",
  1387. "FORCED_LOG_CONF",
  1388. };
  1389. #define PRIORITY_EQUAL_FIRST 0x00000008 // Same priority, new one is first.
  1390. #define PRIORITY_EQUAL_LAST 0x00000000 // Same priority, new one is last.
  1391. #define PRIORITY_BIT 0x00000008 // The bit of priority.
  1392. #ifndef Not_VxD
  1393. /****************************************************************************
  1394.  *
  1395.  * Arbitration list structures
  1396.  *
  1397.  ***************************************************************************/
  1398. struct nodelist_s {
  1399. struct nodelist_s *nl_Next; // Next node element
  1400. struct nodelist_s *nl_Previous; // Previous node element
  1401. struct devnode_s *nl_ItsDevNode; // The dev node it represent
  1402. // You can add fields to this structure, but the first three
  1403. // fields must NEVER be changed.
  1404. struct Log_Conf  *nl_Test_Req; // Test resource alloc request
  1405. ULONG nl_ulSortDWord; // Specifies the sort order
  1406. };
  1407. struct nodelistheader_s {
  1408. struct nodelist_s *nlh_Head; // First node element
  1409. struct nodelist_s *nlh_Tail; // Last node element
  1410. };
  1411. struct arbitfree_s {
  1412. PVOID *af_PointerToInfo; // the arbitrator info
  1413. ULONG af_SizeOfInfo; // size of the info
  1414. };
  1415. #endif
  1416. /****************************************************************************
  1417.  * ARB_QUERY_FREE arbitrator function for memory returns a Range List (see
  1418.  * configuration manager for APIs to use with Range Lists). The values
  1419.  * in the Range List are ranges of taken memory address space.
  1420.  */
  1421. struct MEM_Arb_s {
  1422. RANGE_LIST MEMA_Alloc;
  1423. };
  1424. typedef struct MEM_Arb_s MEMA_ARB;
  1425. /****************************************************************************
  1426.  * ARB_QUERY_FREE arbitrator function for IO returns a Range List (see
  1427.  * configuration manager for APIs to use with Range Lists). The values
  1428.  * in the Range List are ranges of taken IO address space.
  1429.  */
  1430. struct IO_Arb_s {
  1431. RANGE_LIST IOA_Alloc;
  1432. };
  1433. typedef struct IO_Arb_s IOA_ARB;
  1434. /****************************************************************************
  1435.  * ARB_QUERY_FREE arbitrator function for DMA returns the DMA_Arb_s,
  1436.  * 16 bits of allocation bit mask, where DMAA_Alloc is inverted
  1437.  * (set bit indicates free port).
  1438.  */
  1439. struct DMA_Arb_s {
  1440. WORD DMAA_Alloc;
  1441. };
  1442. typedef struct DMA_Arb_s DMA_ARB;
  1443. /***************************************************************************
  1444.  * ARB_QUERY_FREE arbitrator function for IRQ returns the IRQ_Arb_s,
  1445.  * 16 bits of allocation bit mask, 16 bits of share bit mask and 16
  1446.  * BYTES of share count. IRQA_Alloc is inverted (bit set indicates free
  1447.  * port). If port is not free, IRQA_Share bit set indicates port
  1448.  * that is shareable. For shareable IRQs, IRQA_Share_Count indicates
  1449.  * number of devices that are sharing an IRQ.
  1450.  */
  1451. struct IRQ_Arb_s {
  1452. WORD IRQA_Alloc;
  1453. WORD IRQA_Share;
  1454. BYTE IRQA_Share_Count[16];
  1455. };
  1456. typedef struct IRQ_Arb_s IRQ_ARB;
  1457. /* ASM
  1458. DebugCommand Macro FuncName
  1459. local DC_01
  1460. ifndef CM_GOLDEN_RETAIL
  1461. ifdef retail
  1462.   IsDebugOnlyLoaded DC_01
  1463. endif
  1464. Control_Dispatch DEBUG_QUERY, FuncName, sCall
  1465. endif
  1466. DC_01:
  1467. endm
  1468. IFDEF CM_PERFORMANCE_INFO
  1469. CM_PAGEABLE_CODE_SEG TEXTEQU <VxD_LOCKED_CODE_SEG>
  1470. CM_PAGEABLE_CODE_ENDS TEXTEQU <VxD_LOCKED_CODE_ENDS>
  1471. CM_PAGEABLE_DATA_SEG TEXTEQU <VxD_LOCKED_DATA_SEG>
  1472. CM_PAGEABLE_DATA_ENDS TEXTEQU <VxD_LOCKED_DATA_ENDS>
  1473. ELSE
  1474. CM_PAGEABLE_CODE_SEG TEXTEQU <VxD_PNP_CODE_SEG>
  1475. CM_PAGEABLE_CODE_ENDS TEXTEQU <VxD_PNP_CODE_ENDS>
  1476. CM_PAGEABLE_DATA_SEG TEXTEQU <VxD_PAGEABLE_DATA_SEG>
  1477. CM_PAGEABLE_DATA_ENDS TEXTEQU <VxD_PAGEABLE_DATA_ENDS>
  1478. ENDIF
  1479. */
  1480. struct CM_API_s {
  1481. DWORD pCMAPIStack;
  1482. DWORD dwCMAPIService;
  1483. DWORD dwCMAPIRet;
  1484. };
  1485. typedef struct CM_API_s CMAPI;
  1486. /*XLATOFF*/
  1487. #define CM_VXD_RESULT int
  1488. #define CM_EXTERNAL _cdecl
  1489. #define CM_HANDLER _cdecl
  1490. #define CM_SYSCTRL _stdcall
  1491. #define CM_GLOBAL_DATA
  1492. #define CM_LOCAL_DATA static
  1493. #define CM_OFFSET_OF(type, id) ((DWORD)(&(((type)0)->id)))
  1494. #define CM_BUGBUG(d, id, msg) message("BUGBUG: "##d##", "##id##": "##msg)
  1495. #if DEBLEVEL==DEBLEVELRETAIL
  1496. #define CM_WARN(strings)
  1497. #define CM_ERROR(strings)
  1498. #else
  1499. #if DEBLEVEL==DEBLEVELNORMAL
  1500. #define CM_WARN(strings)
  1501. #define CM_ERROR(strings) {
  1502. _Debug_Printf_Service(WARNNAME " ERROR: "); 
  1503. _Debug_Printf_Service##strings; 
  1504. _Debug_Printf_Service("n");}
  1505. #else
  1506. #define CM_WARN(strings) {
  1507. _Debug_Printf_Service(WARNNAME " WARNS: "); 
  1508. _Debug_Printf_Service##strings; 
  1509. _Debug_Printf_Service("n");}
  1510. #define CM_ERROR(strings) {
  1511. _Debug_Printf_Service(WARNNAME " ERROR: "); 
  1512. _Debug_Printf_Service##strings; 
  1513. _Debug_Printf_Service("n"); 
  1514. {_asm int 3}}
  1515. #endif
  1516. #endif
  1517. #ifdef DEBUG
  1518. #define CM_DEBUG_CODE VxD_LOCKED_CODE_SEG
  1519. #define CM_DEBUG_DATA VxD_LOCKED_DATA_SEG
  1520. #else
  1521. #define CM_DEBUG_CODE VxD_DEBUG_ONLY_CODE_SEG
  1522. #define CM_DEBUG_DATA VxD_DEBUG_ONLY_DATA_SEG
  1523. #endif
  1524. #ifdef CM_PERFORMANCE_INFO
  1525. #define CM_PAGEABLE_CODE VxD_LOCKED_CODE_SEG
  1526. #define CM_PAGEABLE_DATA VxD_LOCKED_DATA_SEG
  1527. #define CM_INIT_CODE VxD_INIT_CODE_SEG
  1528. #define CM_INIT_DATA VxD_INIT_DATA_SEG
  1529. #define CURSEG() LCODE
  1530. #else
  1531. #define CM_PAGEABLE_CODE VxD_PNP_CODE_SEG
  1532. #define CM_PAGEABLE_DATA VxD_PAGEABLE_DATA_SEG
  1533. #define CM_INIT_CODE VxD_INIT_CODE_SEG
  1534. #define CM_INIT_DATA VxD_INIT_DATA_SEG
  1535. #pragma warning (disable:4005) // turn off redefinition
  1536. #define CURSEG() CCODE
  1537. #pragma warning (default:4005) // turn on redefinition
  1538. #endif
  1539. #ifndef MAX_PROFILE_LEN
  1540. #define MAX_PROFILE_LEN 80
  1541. #endif
  1542. struct HWProfileInfo_s {
  1543. ULONG HWPI_ulHWProfile; // the profile handle
  1544. char HWPI_szFriendlyName[MAX_PROFILE_LEN]; // the friendly name
  1545. DWORD HWPI_dwFlags; // CM_HWPI_* flags
  1546. };
  1547. typedef struct HWProfileInfo_s        HWPROFILEINFO;
  1548. typedef struct HWProfileInfo_s       *PHWPROFILEINFO;
  1549. typedef struct HWProfileInfo_s CMFAR *PFARHWPROFILEINFO;
  1550. #define CM_HWPI_NOT_DOCKABLE 0x00000000
  1551. #define CM_HWPI_UNDOCKED 0x00000001
  1552. #define CM_HWPI_DOCKED 0x00000002
  1553. #ifdef DEBUG
  1554. #define CM_INTERNAL _cdecl
  1555. #else
  1556. #define CM_INTERNAL _fastcall
  1557. #endif
  1558. #define CM_NAKED __declspec ( naked )
  1559. #define CM_LOCAL CM_INTERNAL
  1560. #define CM_UNIQUE static CM_INTERNAL
  1561. #define CM_BEGIN_CRITICAL {
  1562. _asm pushfd
  1563. _asm cli
  1564. }
  1565. #define CM_END_CRITICAL 
  1566. _asm popfd
  1567. #define CM_FOREVER for (;;)
  1568. #ifndef No_CM_Calls
  1569. #ifdef Not_VxD
  1570. /****************************************************************************
  1571.  *
  1572.  * CONFIGMG_Get_Entry_Point - Return the address to call to get in
  1573.  *    Config Manager.
  1574.  *
  1575.  * Exported.
  1576.  *
  1577.  * ENTRY: None.
  1578.  *
  1579.  * EXIT: None.
  1580.  *
  1581.  * On return, the variable CMEntryPoint has been updated with the
  1582.  * proper address to call to get to Configuration Manager.
  1583.  *
  1584.  ***************************************************************************/
  1585. DWORD static
  1586. CM_Get_Entry_Point(void)
  1587. {
  1588. static DWORD CMEntryPoint=NULL;
  1589. if (CMEntryPoint)
  1590. return(CMEntryPoint);
  1591. _asm push bx
  1592. _asm push es
  1593. _asm push di
  1594. _asm xor di, di
  1595. _asm mov ax, 0x1684
  1596. _asm mov bx, 0x33
  1597. _asm mov es, di
  1598. _asm int 0x2f
  1599. _asm mov word ptr [CMEntryPoint+2], es
  1600. _asm mov word ptr [CMEntryPoint], di
  1601. _asm pop di
  1602. _asm pop es
  1603. _asm pop bx
  1604. return(CMEntryPoint);
  1605. }
  1606. #define MAKE_CM_HEADER(Function, Parameters) 
  1607. CONFIGRET static _near _cdecl 
  1608. CM_##Function##Parameters 
  1609. CONFIGRET CMRetValue=0; 
  1610. DWORD CMEntryPoint; 
  1611. WORD wCMAPIService=GetVxDServiceOrdinal(_CONFIGMG_##Function); 
  1612. if ((CMEntryPoint=CM_Get_Entry_Point())==0) 
  1613. return(0); 
  1614. _asm {mov ax, wCMAPIService};
  1615. _asm {call CMEntryPoint}; 
  1616. _asm {mov CMRetValue, ax};
  1617. return(CMRetValue); 
  1618. }
  1619. #else // Not_VxD
  1620. #define MAKE_CM_HEADER(Function, Parameters) 
  1621. MAKE_HEADER(CONFIGRET, _cdecl, CAT(_CONFIGMG_, Function), Parameters)
  1622. #endif // Not_VxD
  1623. /****************************************************************************
  1624.  *
  1625.  * WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
  1626.  *
  1627.  * Each of the following functions must match their equivalent service
  1628.  * and the parameter table in dos386vmmconfigmgservices.*.
  1629.  *
  1630.  * Except for the Get_Version, each function return a CR_* result in EAX
  1631.  * (AX for non IS_32 app) and can trash ECX and/or EDX as they are 'C'
  1632.  * callable.
  1633.  *
  1634.  * WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
  1635.  *
  1636.  ***************************************************************************/
  1637. #pragma warning (disable:4100) // Param not used
  1638. #ifdef Not_VxD
  1639. MAKE_CM_HEADER(Get_Version, (VOID))
  1640. #else
  1641. WORD VXDINLINE
  1642. CONFIGMG_Get_Version(VOID)
  1643. {
  1644. WORD w;
  1645. VxDCall(_CONFIGMG_Get_Version);
  1646. _asm mov [w], ax
  1647. return(w);
  1648. }
  1649. #endif
  1650. MAKE_CM_HEADER(Initialize, (ULONG ulFlags))
  1651. MAKE_CM_HEADER(Locate_DevNode, (PDEVNODE pdnDevNode, DEVNODEID pDeviceID, ULONG ulFlags))
  1652. MAKE_CM_HEADER(Get_Parent, (PDEVNODE pdnDevNode, DEVNODE dnDevNode, ULONG ulFlags))
  1653. MAKE_CM_HEADER(Get_Child, (PDEVNODE pdnDevNode, DEVNODE dnDevNode, ULONG ulFlags))
  1654. MAKE_CM_HEADER(Get_Sibling, (PDEVNODE pdnDevNode, DEVNODE dnDevNode, ULONG ulFlags))
  1655. MAKE_CM_HEADER(Get_Device_ID_Size, (PFARULONG pulLen, DEVNODE dnDevNode, ULONG ulFlags))
  1656. MAKE_CM_HEADER(Get_Device_ID, (DEVNODE dnDevNode, PFARVOID Buffer, ULONG BufferLen, ULONG ulFlags))
  1657. MAKE_CM_HEADER(Get_Depth, (PFARULONG pulDepth, DEVNODE dnDevNode, ULONG ulFlags))
  1658. MAKE_CM_HEADER(Get_Private_DWord, (PFARULONG pulPrivate, DEVNODE dnInDevNode, DEVNODE dnForDevNode, ULONG ulFlags))
  1659. MAKE_CM_HEADER(Set_Private_DWord, (DEVNODE dnInDevNode, DEVNODE dnForDevNode, ULONG ulValue, ULONG ulFlags))
  1660. MAKE_CM_HEADER(Create_DevNode, (PDEVNODE pdnDevNode, DEVNODEID pDeviceID, DEVNODE dnParent, ULONG ulFlags))
  1661. MAKE_CM_HEADER(Query_Remove_SubTree, (DEVNODE dnAncestor, ULONG ulFlags))
  1662. MAKE_CM_HEADER(Remove_SubTree, (DEVNODE dnAncestor, ULONG ulFlags))
  1663. MAKE_CM_HEADER(Register_Device_Driver, (DEVNODE dnDevNode, CMCONFIGHANDLER Handler, ULONG ulRefData, ULONG ulFlags))
  1664. MAKE_CM_HEADER(Register_Enumerator, (DEVNODE dnDevNode, CMENUMHANDLER Handler, ULONG ulFlags))
  1665. MAKE_CM_HEADER(Register_Arbitrator, (PREGISTERID pRid, RESOURCEID id, CMARBHANDLER Handler, ULONG ulDWordToBePassed, DEVNODE dnArbitratorNode, ULONG ulFlags))
  1666. MAKE_CM_HEADER(Deregister_Arbitrator, (REGISTERID id, ULONG ulFlags))
  1667. MAKE_CM_HEADER(Query_Arbitrator_Free_Size, (PFARULONG pulSize, DEVNODE dnDevNode, RESOURCEID ResourceID, ULONG ulFlags))
  1668. MAKE_CM_HEADER(Query_Arbitrator_Free_Data, (PFARVOID pData, ULONG DataLen, DEVNODE dnDevNode, RESOURCEID ResourceID, ULONG ulFlags))
  1669. MAKE_CM_HEADER(Sort_NodeList, (NODELIST_HEADER nlhNodeListHeader, ULONG ulFlags))
  1670. MAKE_CM_HEADER(Yield, (ULONG ulMicroseconds, ULONG ulFlags))
  1671. MAKE_CM_HEADER(Lock, (ULONG ulFlags))
  1672. MAKE_CM_HEADER(Unlock, (ULONG ulFlags))
  1673. MAKE_CM_HEADER(Add_Empty_Log_Conf, (PLOG_CONF plcLogConf, DEVNODE dnDevNode, PRIORITY Priority, ULONG ulFlags))
  1674. MAKE_CM_HEADER(Free_Log_Conf, (LOG_CONF lcLogConfToBeFreed, ULONG ulFlags))
  1675. MAKE_CM_HEADER(Get_First_Log_Conf, (PLOG_CONF plcLogConf, DEVNODE dnDevNode, ULONG ulFlags))
  1676. MAKE_CM_HEADER(Get_Next_Log_Conf, (PLOG_CONF plcLogConf, LOG_CONF lcLogConf, ULONG ulFlags))
  1677. MAKE_CM_HEADER(Add_Res_Des, (PRES_DES prdResDes, LOG_CONF lcLogConf, RESOURCEID ResourceID, PFARVOID ResourceData, ULONG ResourceLen, ULONG ulFlags))
  1678. MAKE_CM_HEADER(Modify_Res_Des, (PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ResourceID, PFARVOID ResourceData, ULONG ResourceLen, ULONG ulFlags))
  1679. MAKE_CM_HEADER(Free_Res_Des, (PRES_DES prdResDes, RES_DES rdResDes, ULONG ulFlags))
  1680. MAKE_CM_HEADER(Get_Next_Res_Des, (PRES_DES prdResDes, RES_DES CurrentResDesOrLogConf, RESOURCEID ForResource, PRESOURCEID pResourceID, ULONG ulFlags))
  1681. MAKE_CM_HEADER(Get_Performance_Info, (PCMPERFINFO pPerfInfo, ULONG ulFlags))
  1682. MAKE_CM_HEADER(Get_Res_Des_Data_Size, (PFARULONG pulSize, RES_DES rdResDes, ULONG ulFlags))
  1683. MAKE_CM_HEADER(Get_Res_Des_Data, (RES_DES rdResDes, PFARVOID Buffer, ULONG BufferLen, ULONG ulFlags))
  1684. MAKE_CM_HEADER(Process_Events_Now, (ULONG ulFlags))
  1685. MAKE_CM_HEADER(Create_Range_List, (PRANGE_LIST prlh, ULONG ulFlags))
  1686. MAKE_CM_HEADER(Add_Range, (ULONG ulStartValue, ULONG ulEndValue, RANGE_LIST rlh, ULONG ulFlags))
  1687. MAKE_CM_HEADER(Delete_Range, (ULONG ulStartValue, ULONG ulEndValue, RANGE_LIST rlh, ULONG ulFlags))
  1688. MAKE_CM_HEADER(Test_Range_Available, (ULONG ulStartValue, ULONG ulEndValue, RANGE_LIST rlh, ULONG ulFlags))
  1689. MAKE_CM_HEADER(Dup_Range_List, (RANGE_LIST rlhOld, RANGE_LIST rlhNew, ULONG ulFlags))
  1690. MAKE_CM_HEADER(Free_Range_List, (RANGE_LIST rlh, ULONG ulFlags))
  1691. MAKE_CM_HEADER(Invert_Range_List, (RANGE_LIST rlhOld, RANGE_LIST rlhNew, ULONG ulMaxVal, ULONG ulFlags))
  1692. MAKE_CM_HEADER(Intersect_Range_List, (RANGE_LIST rlhOld1, RANGE_LIST rlhOld2, RANGE_LIST rlhNew, ULONG ulFlags))
  1693. MAKE_CM_HEADER(First_Range, (RANGE_LIST rlh, PFARULONG pulStart, PFARULONG pulEnd, PRANGE_ELEMENT preElement, ULONG ulFlags))
  1694. MAKE_CM_HEADER(Next_Range, (PRANGE_ELEMENT preElement, PFARULONG pulStart, PFARULONG pulEnd, ULONG ulFlags))
  1695. MAKE_CM_HEADER(Dump_Range_List, (RANGE_LIST rlh, ULONG ulFlags))
  1696. MAKE_CM_HEADER(Load_DLVxDs, (DEVNODE dnDevNode, PFARCHAR FileNames, LOAD_TYPE LoadType, ULONG ulFlags))
  1697. MAKE_CM_HEADER(Get_DDBs, (PPPVMMDDB ppDDB, PFARULONG pulCount, LOAD_TYPE LoadType, DEVNODE dnDevNode, ULONG ulFlags))
  1698. MAKE_CM_HEADER(Get_CRC_CheckSum, (PFARVOID pBuffer, ULONG ulSize, PFARULONG pulSeed, ULONG ulFlags))
  1699. MAKE_CM_HEADER(Register_DevLoader, (PVMMDDB pDDB, ULONG ulFlags))
  1700. MAKE_CM_HEADER(Reenumerate_DevNode, (DEVNODE dnDevNode, ULONG ulFlags))
  1701. MAKE_CM_HEADER(Setup_DevNode, (DEVNODE dnDevNode, ULONG ulFlags))
  1702. MAKE_CM_HEADER(Reset_Children_Marks, (DEVNODE dnDevNode, ULONG ulFlags))
  1703. MAKE_CM_HEADER(Get_DevNode_Status, (PFARULONG pulStatus, PFARULONG pulProblemNumber, DEVNODE dnDevNode, ULONG ulFlags))
  1704. MAKE_CM_HEADER(Remove_Unmarked_Children, (DEVNODE dnDevNode, ULONG ulFlags))
  1705. MAKE_CM_HEADER(ISAPNP_To_CM, (PFARVOID pBuffer, DEVNODE dnDevNode, ULONG ulLogDev, ULONG ulFlags))
  1706. MAKE_CM_HEADER(CallBack_Device_Driver, (CMCONFIGHANDLER Handler, ULONG ulFlags))
  1707. MAKE_CM_HEADER(CallBack_Enumerator, (CMENUMHANDLER Handler, ULONG ulFlags))
  1708. MAKE_CM_HEADER(Get_Alloc_Log_Conf, (PCMCONFIG pccBuffer, DEVNODE dnDevNode, ULONG ulFlags))
  1709. MAKE_CM_HEADER(Get_DevNode_Key_Size, (PFARULONG pulLen, DEVNODE dnDevNode, PFARCHAR pszSubKey, ULONG ulFlags))
  1710. MAKE_CM_HEADER(Get_DevNode_Key, (DEVNODE dnDevNode, PFARCHAR pszSubKey, PFARVOID Buffer, ULONG BufferLen, ULONG ulFlags))
  1711. MAKE_CM_HEADER(Read_Registry_Value, (DEVNODE dnDevNode, PFARCHAR pszSubKey, PFARCHAR pszValueName, ULONG ulExpectedType, PFARVOID pBuffer, PFARULONG pulLength, ULONG ulFlags))
  1712. MAKE_CM_HEADER(Write_Registry_Value, (DEVNODE dnDevNode, PFARCHAR pszSubKey, PFARCHAR pszValueName, ULONG ulType, PFARVOID pBuffer, ULONG ulLength, ULONG ulFlags))
  1713. MAKE_CM_HEADER(Disable_DevNode, (DEVNODE dnDevNode, ULONG ulFlags))
  1714. MAKE_CM_HEADER(Enable_DevNode, (DEVNODE dnDevNode, ULONG ulFlags))
  1715. MAKE_CM_HEADER(Move_DevNode, (DEVNODE dnFromDevNode, DEVNODE dnToDevNode, ULONG ulFlags))
  1716. MAKE_CM_HEADER(Set_Bus_Info, (DEVNODE dnDevNode, CMBUSTYPE btBusType, ULONG ulSizeOfInfo, PFARVOID pInfo, ULONG ulFlags))
  1717. MAKE_CM_HEADER(Get_Bus_Info, (DEVNODE dnDevNode, PCMBUSTYPE pbtBusType, PFARULONG pulSizeOfInfo, PFARVOID pInfo, ULONG ulFlags))
  1718. MAKE_CM_HEADER(Set_HW_Prof, (ULONG ulConfig, ULONG ulFlags))
  1719. MAKE_CM_HEADER(Recompute_HW_Prof, (ULONG ulDock, ULONG ulSerialNo, ULONG ulFlags))
  1720. MAKE_CM_HEADER(Query_Change_HW_Prof, (ULONG ulDock, ULONG ulSerialNo, ULONG ulFlags))
  1721. MAKE_CM_HEADER(Get_Device_Driver_Private_DWord, (DEVNODE dnDevNode, PFARULONG pulDWord, ULONG ulFlags))
  1722. MAKE_CM_HEADER(Set_Device_Driver_Private_DWord, (DEVNODE dnDevNode, ULONG ulDword, ULONG ulFlags))
  1723. MAKE_CM_HEADER(Get_HW_Prof_Flags, (PFARCHAR szDevNodeName, ULONG ulConfig, PFARULONG pulValue, ULONG ulFlags))
  1724. MAKE_CM_HEADER(Set_HW_Prof_Flags, (PFARCHAR szDevNodeName, ULONG ulConfig, ULONG ulValue, ULONG ulFlags))
  1725. MAKE_CM_HEADER(Read_Registry_Log_Confs, (DEVNODE dnDevNode, ULONG ulFlags))
  1726. MAKE_CM_HEADER(Run_Detection, (ULONG ulFlags))
  1727. MAKE_CM_HEADER(Call_At_Appy_Time, (CMAPPYCALLBACKHANDLER Handler, ULONG ulRefData, ULONG ulFlags))
  1728. MAKE_CM_HEADER(Fail_Change_HW_Prof, (ULONG ulFlags))
  1729. MAKE_CM_HEADER(Set_Private_Problem, (DEVNODE dnDevNode, ULONG ulRefData, ULONG ulFlags))
  1730. MAKE_CM_HEADER(Debug_DevNode, (DEVNODE dnDevNode, ULONG ulFlags))
  1731. MAKE_CM_HEADER(Get_Hardware_Profile_Info, (ULONG ulIndex, PFARHWPROFILEINFO pHWProfileInfo, ULONG ulFlags))
  1732. MAKE_CM_HEADER(Register_Enumerator_Function, (DEVNODE dnDevNode, CMENUMFUNCTION Handler, ULONG ulFlags))
  1733. MAKE_CM_HEADER(Call_Enumerator_Function, (DEVNODE dnDevNode, ENUMFUNC efFunc, ULONG ulRefData, PFARVOID pBuffer, ULONG ulBufferSize, ULONG ulFlags))
  1734. MAKE_CM_HEADER(Add_ID, (DEVNODE dnDevNode, PFARCHAR pszID, ULONG ulFlags))
  1735. #pragma warning (default:4100) // Param not used
  1736. #endif // ifndef No_CM_Calls
  1737. /*XLATON*/
  1738. #endif // ifndef CMJUSTRESDES
  1739. #endif // _CONFIGMG_H