home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / rmbase.zip / RMBASE.INF (.txt)
OS/2 Help File  |  1994-11-17  |  125KB  |  3,574 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
  3.  
  4. First Edition (November 1994) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions, therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for technical information about IBM products should be made to your 
  27. IBM authorized reseller or IBM marketing representative. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
  31.  
  32. COPYRIGHT LICENSE: This publication contains printed sample application 
  33. programs in source language, which illustrate OS/2 programming techniques. You 
  34. may copy, modify, and distribute these sample programs in any form without 
  35. payment to IBM, for the purposes of developing, using, marketing or 
  36. distributing application programs conforming to the OS/2 application 
  37. programming interface. 
  38.  
  39. Each copy of any portion of these sample programs or any derivative work, which 
  40. is distributed to others, must include a copyright notice as follows: "(C) 
  41. (your company name) (year).  All rights reserved." 
  42.  
  43. (C) Copyright International Business Machines Corporation 1994. All rights 
  44. reserved. 
  45. Note to U.S. Government Users - Documentation related to restricted rights - 
  46. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  47. Schedule Contract with IBM Corp. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
  51.  
  52. References in this publication to IBM products, programs, or services do not 
  53. imply that IBM intends to make these available in all countries in which IBM 
  54. operates. Any reference to an IBM product, program or service is not intended 
  55. to state or imply that only IBM's product, program, or service may be used. Any 
  56. functionally equivalent product, program, or service that does not infringe any 
  57. of IBM's intellectual property rights or other legally protectable rights may 
  58. be used instead of the IBM product, program, or service. Evaluation and 
  59. verification of operation in conjunction with other products, programs, or 
  60. services, except those expressly designated by IBM, are the user's 
  61. responsibility. 
  62.  
  63. IBM may have patents or pending patent applications covering subject matter in 
  64. this document. The furnishing of this document does not give you any license to 
  65. these patents. You can send license inquiries, in writing, to the IBM Director 
  66. of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594, U.S.A. 
  67.  
  68.  
  69. ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
  70.  
  71. The following terms, denoted by an asterisk (*) in this publication, are 
  72. trademarks of the IBM Corporation in the United States or other countries: 
  73.  
  74. IBM
  75. Micro Channel
  76. OS/2
  77. PC-XT
  78.  
  79. The following terms, denoted by a double asterisk (**) in this publication, are 
  80. trademarks of other companies as follows. Other trademarks are trademarks of 
  81. their respective companies. 
  82.  
  83.  Adaptec             Adaptec, Inc. 
  84.  PCMCIA              Personal Computer Memory Card International Association 
  85.  Pro AudioSpectrum   MediaVision, Inc. 
  86.  Windows             Microsoft Corporation 
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 2. About This Book ΓòÉΓòÉΓòÉ
  90.  
  91. Resource Manager for OS/2* contains a description of the OS/2 Resource Manager 
  92. Architecture.  Areas covered include architecture overview, programming 
  93. interface definitions, programming structure definitions, and general 
  94. development usage information.  This document is written for device driver 
  95. developers using OS/2. 
  96.  
  97. The chapters include the following: 
  98.  
  99. Resource Management Architecture gives an overview of the Resource Manager and 
  100. describes its architecture. 
  101.  
  102. RESERVE.SYS describes how the RESERVE.SYS device driver uses the Resource 
  103. Manager for determining the resources available for a device driver. 
  104.  
  105. Linking Resource Manager Services discusses the programming considerations of 
  106. adding Resource Management services to your driver. 
  107.  
  108. Resource Manager Services describes physical node management, resource 
  109. management, node searches, node information, and logical node management.  It 
  110. also has a section that describes the Resource Manager return codes. 
  111.  
  112. Resource Manager IOCtls defines the two IOCTls that are used for Resource 
  113. Manager. 
  114.  
  115. RMBASE.H contains the header file for Resource Manager. 
  116.  
  117. Notices contain IBM and non-IBM trademarks used in this document. 
  118.  
  119.  
  120. ΓòÉΓòÉΓòÉ 2.1. Conventions Used in This Book ΓòÉΓòÉΓòÉ
  121.  
  122. Unless otherwise stated, "OS/2" as used in this book refers to the Warp version 
  123. of the IBM* Operating System/2. 
  124.  
  125.  
  126. ΓòÉΓòÉΓòÉ 3. Resource Management Architecture ΓòÉΓòÉΓòÉ
  127.  
  128. This chapter contains a description of the OS/2 Resource Management 
  129. architecture. 
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 3.1. Overview ΓòÉΓòÉΓòÉ
  133.  
  134. The increased user demand for additional functions in a computer system has 
  135. resulted in a broader range of more sophisticated peripheral and internal 
  136. system devices. The continued expansion of computer devices has in turn, 
  137. stressed the already limited pool of system resources, as well as raised the 
  138. complexity of detecting and configuring the devices. 
  139.  
  140. Therefore, OS/2 is introducing a centralized Resource Management architecture 
  141. to facilitate the coexistence and cooperation of the increasing number of 
  142. device drivers. The following figure depicts the main components that comprise 
  143. the OS/2 Resource Management architecture. 
  144.  
  145. With the introduction of this architecture, a functional line has been drawn 
  146. separating previous device driver capabilities and those of the OS/2 device 
  147. drivers written to use the Resource Manager services. Device drivers written to 
  148. use the Resource Manager Services are referred to as RM-aware drivers. Existing 
  149. OS/2 2.x device drivers are referred to as legacy drivers. Furthermore, the 
  150. definition of legacy drivers includes DOS, Windows**, and OS/2 2.x drivers. 
  151.  
  152. At the center of this architecture is the Resource Manager (RESOURCE.SYS), 
  153. which provides a set of C-callable services to the other RM-aware components. 
  154. As denoted by the dotted box surrounding the legacy drivers in the preceding 
  155. figure, an additional RM-aware component (RESERVE.SYS) has been added to report 
  156. the resources used by these drivers. This reservation driver is key to 
  157. maintaining an accurate map of the system resources being managed by the 
  158. Resource Manager. (See RESERVE.SYS for more details on the reservation driver.) 
  159.  
  160. The Resource Manager manages much more than just the system hardware resources. 
  161. It also assumes centralized responsibility for coordinating all aspects of both 
  162. the logical and physical views of the hardware and supporting software in the 
  163. system. The logical view is defined as the standard aliases assigned to devices 
  164. for application reference (such as COM1, drive A, and LPT1). The physical view 
  165. is defined as the actual details of the hardware topology such as port 
  166. addresses and bus type. 
  167.  
  168. In order to discuss the organization of the logical and physical views provided 
  169. by the Resource Manager, several concepts and terms need to be reviewed.  These 
  170. concepts and terms are presented next. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 3.1.1. Resources ΓòÉΓòÉΓòÉ
  174.  
  175. The hardware resources managed by the Resource Manager are: 
  176.  
  177.    o  I/O Port Ranges 
  178.    o  IRQ Levels 
  179.    o  DMA Channels 
  180.    o  Memory Regions 
  181.    o  Timer Channels 
  182.  
  183.  Driver writers are encouraged to identify their hardware settings during 
  184.  driver initialization directly rather than relying on the end-user to provide 
  185.  this information. 
  186.  
  187.  The Resource Manager services facilitate this process by identifying resources 
  188.  (I/O Ports, DMA Channels, and IRQ Levels) that are already claimed by drivers 
  189.  and have been initialized previously. A driver using the Resource Management 
  190.  calls can avoid inadvertently corrupting the state of adapters that were 
  191.  initialized by previously loaded drivers. 
  192.  
  193.  When resources are assigned, various levels of sharing are allowed. The type 
  194.  of sharing allowed depends on the underlying characteristics of the devices. 
  195.  Resource sharing options are discussed in Managing System Resources. 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 3.1.2. Drivers, Adapters, and Devices ΓòÉΓòÉΓòÉ
  199.  
  200. The Resource Manager also manages drivers, adapters, and devices. Adapters and 
  201. devices are associated with each other in a parent-child-sibling relationship. 
  202. A driver is associated with each adapter or device node. They are defined as 
  203. follows: 
  204.  
  205.  
  206. ΓòÉΓòÉΓòÉ 3.1.2.1. Drivers ΓòÉΓòÉΓòÉ
  207.  
  208. A driver usually represents a software module responsible for management of one 
  209. or more pieces of physical hardware. In addition, drivers include value-added 
  210. subsystems that may not directly interact with physical hardware. To use other 
  211. Resource Manager services, it is necessary to provide a driver handle that is 
  212. obtained when declaring a driver. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 3.1.2.2. Adapters ΓòÉΓòÉΓòÉ
  216.  
  217. Adapters are defined as devices that convert from one bus protocol to another. 
  218. For example, a SCSI adapter converts the host bus protocol (for example, ISA, 
  219. EISA, or PCI), to SCSI bus protocols. The system bus (for example, ISA, EISA, 
  220. or PCI) is represented in the Resource Manager as an adapter, converting from 
  221. the CPU-internal bus protocols to a standard host-bus protocol. 
  222.  
  223. In some cases, adapters may not directly correspond to physical packaging. An 
  224. example of this could be a CD-ROM port on a multifunction sound board that is 
  225. represented as a separate adapter. However, it is generally encouraged to try 
  226. to "align" adapters with the physical packaging of the system to help end-users 
  227. to identify their hardware easily. 
  228.  
  229.  
  230. ΓòÉΓòÉΓòÉ 3.1.2.3. Devices ΓòÉΓòÉΓòÉ
  231.  
  232. Devices are defined in the "traditional" meaning of end-user devices. This 
  233. includes printers, disks, CD-ROMS, and so forth. 
  234.  
  235.  
  236. ΓòÉΓòÉΓòÉ 3.2. Physical View Management ΓòÉΓòÉΓòÉ
  237.  
  238. The Resource Manager maintains a physical view of the system (hardware 
  239. topology) that is utilized by all RM-aware components. 
  240.  
  241. The physical view is shown in a tree structure. Each node within the tree 
  242. structure represents a device or adapter.  Associated with each adapter or 
  243. device node are resource and driver structures. 
  244.  
  245. The Resource Manager automatically creates adapter and device nodes 
  246. representing basic system resources, such as the CPU and system buses during 
  247. its initialization. In addition, devices managed directly by the OS/2 kernel, 
  248. such as the Interrupt Controller (PIC) and DMA Channels, are also automatically 
  249. defined. In the following diagram, the X_Bus represents the system bus where 
  250. many of the integrated components reside, such as the DMA control and the 
  251. real-time clock. The following is a physical view of the Resource Manager. 
  252.  
  253. As device drivers initialize, additional adapter and device nodes are created 
  254. by the device drivers issuing Resource Manager service calls. 
  255.  
  256. Each node has associated resources owned by the underlying device or adapter 
  257. and the software driver responsible for managing the adapter or device. The 
  258. following diagram illustrates the process. 
  259.  
  260.  
  261. ΓòÉΓòÉΓòÉ 3.2.1. Device Adapter Keys ΓòÉΓòÉΓòÉ
  262.  
  263. Each adapter device node contains text describing the adapter or device. To 
  264. facilitate searching for a particular node, the beginning characters of the 
  265. descriptive text are assumed to be keys. Keys are subject to the following 
  266. rules: 
  267.  
  268.    o  Any sibling nodes, such as nodes connected to the same parent, must have 
  269.       unique keys. 
  270.  
  271.    o  Keys end at the first blank character or the 16th consecutive non-blank 
  272.       character. 
  273.  
  274.    o  Keys are part of the descriptive text and must consist of printable ASCII 
  275.       characters. 
  276.  
  277.  Assign unique keys to adapter nodes based on their product name or function. 
  278.  For example: 
  279.  
  280.  CPU_0          CPU x486 
  281.  IDE_0          Generic IDE Channel Adapter 
  282.  AHA154X_0      AHA154X_0 
  283.  AHA154X_1      Adaptec** 154X SCSI Adapters 
  284.  PAS16          Pro AudioSpectrum** Audio Adapter 
  285.  
  286.  If multiple occurrences of the same type of adapter occurs, keys must be made 
  287.  unique by appending a _0, _1, ..., suffix to the key. 
  288.  
  289.  The Resource Manager services can automatically generate the _0, _1, ... 
  290.  suffix based on the adapter number supplied. Refer to RMCreateAdapter - Obtain 
  291.  an Adapter Handle for further information. 
  292.  
  293.  Assign the following the naming conventions for device nodes: 
  294.  
  295.  COMM_0         Serial Port 
  296.  DISK_0         DASD Device 
  297.  CDROM_0        CDROM Device 
  298.  TAPE_0         Tape Device 
  299.  PRINTER_0      Printer Device 
  300.  SCANNER_0      Scanner Device 
  301.  
  302.  The Resource Manager services can automatically generate the _0, _1, ... 
  303.  suffix based on the device number supplied. This is done by including a "#" 
  304.  character at the end of the key. The RMCreateAdapter service and the 
  305.  RMCreateDevice service will replace the "#" character with the adapter or 
  306.  device number indicated. For example: 
  307.  
  308.         DSKT_#  - 1.44MB diskette drive
  309.  
  310.  will be converted to: 
  311.  
  312.         DSKT_0  - 1.44 MB diskette drive
  313.  
  314.  This process will occur provided that an adjunct structure containing the 
  315.  device number (ADJ_DEVICE_NUMBER) is passed on the RMCreateDevice service 
  316.  call. Adjunct data structures are discussed in Adjunct Data. Keys for SCSI 
  317.  devices should use the above device types followed by _(t,l) corresponding to 
  318.  the Target/Lun SCSI device. For example: 
  319.  
  320.  
  321.       DISK_(0,0)
  322.       CDROM_(3,0)
  323.  
  324.  RMParseSCSIInquiry - Build SCSI Device Description automatically generates 
  325.  appropriate keys for SCSI devices. An adjunct structure containing the 
  326.  Target/Lun device (ADJ_SCSI_TARGET_LUN) should be passed on the RMCreateDevice 
  327.  service call. 
  328.  
  329.  
  330. ΓòÉΓòÉΓòÉ 3.2.2. Adjunct Data ΓòÉΓòÉΓòÉ
  331.  
  332. At times it is necessary to pass data to the Resource Manager services that can 
  333. be relevant in one case but not in another call to the same service. In these 
  334. cases, this optional data is passed in a linked list of structures called an 
  335. Adjunct List. 
  336.  
  337. The contents of the structures are determined by the adjunct types that are 
  338. defined in RMBASE.H. A few of the more common adjunct types are listed as 
  339. follows: 
  340.  
  341.  ADJ_DEVICE_NUMBER        Contains the zero-based unit number for the device 
  342.                           being created. The Resource Manager will use this 
  343.                           number to enumerate the key for the device. 
  344.  
  345.  ADJ_ADAPTER_NUMBER       Contains the zero-based adapter number for the 
  346.                           adapter being created. The Resource Manager will use 
  347.                           this number to enumerate the key for the adapter. 
  348.  
  349.  ADJ_SCSI_TARGET_LUN      Contains the SCSI Target/Lun for the device being 
  350.                           created. The Resource Manager will generate a SCSI 
  351.                           type enumeration suffix as described in Device 
  352.                           Adapter Keys. 
  353.  
  354.  ADJ_ADD_UNIT             Contains the ADD/DM ADD Handle and Unit Handle 
  355.                           assigned to the device being created. 
  356.  
  357.  
  358. ΓòÉΓòÉΓòÉ 3.2.3. Managing System Resources ΓòÉΓòÉΓòÉ
  359.  
  360. When a device driver allocates resources, it specifies the level of sharing 
  361. that the driver is willing to accept. The level of sharing selected depends on 
  362. the characteristics of the hardware, such as its ability to coordinate usage of 
  363. IRQ or DMA channels with other adapters, as well as the importance of other 
  364. functions that may need the same IRQ level. Resources are allocated on a 
  365. first-come first-serve basis. 
  366.  
  367. If a driver requests a resource that has been previously allocated to another 
  368. driver, then the sharing mode selected by the earlier driver is used to 
  369. determine if the new driver's request will be granted. 
  370.  
  371. The following resource sharing options are available: 
  372.  
  373.  EXCLUSIVE                The resource (such as the I/O Port and DMA Channel) 
  374.                           is committed to the owner until it is explicitly 
  375.                           released. Any other requests for this resource will 
  376.                           be denied. 
  377.  
  378.  SHARED                   The resource will be granted to any requester that 
  379.                           also requests the resource as shared. This implies 
  380.                           that the users of the resource can use it at any time 
  381.                           without interfering with each other. An example of a 
  382.                           shared resource would be a shared interrupt on a 
  383.                           Micro Channel* or EISA bus machine. 
  384.  
  385.  MULTIPLEXED              The resource will be granted to any requester that 
  386.                           also requests the resource as multiplexed. 
  387.                           Multiplexed (unlike shared) implies that only one 
  388.                           owner can actively be using the resource and that 
  389.                           there is explicit notification between owners to 
  390.                           control which requester is using the resource. In 
  391.                           general, this sharing protocol is private to the 
  392.                           multiplexed resource. 
  393.  
  394.  GRANTYIELD               The resource will be granted to any requester that 
  395.                           also requests the resource as GRANTYIELD. GRANTYIELD 
  396.                           implies that the owner of the resource is willing to 
  397.                           participate in a sharing of a resource that is 
  398.                           arbitrated by a Resource Manager. 
  399.  
  400.                           Note:  GRANTYIELD protocol is not currently in 
  401.                                  version 1.1 of RESOURCE.SYS. 
  402.  
  403.  
  404. ΓòÉΓòÉΓòÉ 3.3. Logical View Management ΓòÉΓòÉΓòÉ
  405.  
  406. The Resource Manager maintains a logical view of the system device nodes that 
  407. is utilized by applications, end-users, and device managers (or drivers 
  408. performing similar functions). This section discusses the key aspects of the 
  409. logical view. 
  410.  
  411. OS/2 uses aliases to identify various physical devices. Typically, these 
  412. aliases are short descriptive names that are familiar to most users, such as 
  413. DISK_0, drive A or C, COM1, and LPT1. 
  414.  
  415. The use of aliases simplifies the operating system's (and end-user's) view of 
  416. the system in the following ways: 
  417.  
  418.    o  The implementation of a physical device (for example, a disk), depends on 
  419.       a combination of the system bus, a SCSI or IDE adapter, and the disk 
  420.       device. It is convenient to the end user to abstract this to a simple 
  421.       name such as DISK_0, DISK_1, and so forth, rather than using the full 
  422.       path name to the device. 
  423.  
  424.    o  The operating system may subdivide (or group) devices so the physical 
  425.       device boundaries are no longer relevant. For example, partitioning 
  426.       subdivides a physical disk into a series of separate drives, while a RAID 
  427.       array may group several physical devices into a single drive. 
  428.  
  429.    o  The operating system can have alternate views of the same physical 
  430.       device. For example, a physical serial port can be used as a FAX port 
  431.       (FMD1$) or used as an ASYNC port (COM1), depending on the application 
  432.       using the port. 
  433.  
  434.  To provide a mapping from the logical (end-user) view of the system to the 
  435.  actual hardware topology, the Resource Manager maintains a separate node 
  436.  structure called a logical tree as shown in the following diagram: 
  437.  
  438.  The logical tree contains two types of nodes, logical devices (LDEVs) and 
  439.  system names (SYSNAMEs). Logical device nodes represent aliases of nodes on 
  440.  the physical device tree. The system name nodes represent named divisions of 
  441.  the parent LDEV. 
  442.  
  443.  Depending on the nature of the device, these names can be alternate 
  444.  definitions of the LDEV that are mutually exclusive (such as FMD1$ and COM1:) 
  445.  or they can be shared (such as drive letters C, E, or F). 
  446.  
  447.  Logical devices and system names are associated with each other in a 
  448.  parent-child-sibling relationship. A driver is associated with each LDEV node. 
  449.  
  450.  The Resource Manager automatically creates logical device nodes representing 
  451.  basic system device types such as DASD, CD-ROM, tape, serial, and parallel, 
  452.  during its initialization. Device managers and certain device drivers (such as 
  453.  COM.SYS) create additional logical devices and system name nodes as they 
  454.  declare new devices to the OS/2 kernel. 
  455.  
  456.  
  457. ΓòÉΓòÉΓòÉ 4. RESERVE.SYS ΓòÉΓòÉΓòÉ
  458.  
  459. RESERVE.SYS is used in conjunction with the Resource Manager in two separate 
  460. scenarios: 
  461.  
  462.    o  If you are using a device driver that is not Resource Manager-aware and 
  463.       you know the resources that the device uses, use RESERVE.SYS to reserve 
  464.       those resources so the Resource Manager-aware drivers will not have 
  465.       access to those resources. 
  466.  
  467.    o  If you have a piece of hardware that does not tolerate the examination of 
  468.       its resources, reserve the resources so the Resource Manager-aware 
  469.       drivers do not examine the hardware. 
  470.  
  471.  To use RESERVE.SYS, place the following statement as the first line in 
  472.  CONFIG.SYS: 
  473.  
  474.   basedev=reserve.sys  <arguments>
  475.  
  476.  Arguments: 
  477.  
  478.  
  479.       ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  480.       v                                             Γöé
  481.    Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇ /IO:  ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇ
  482.       Γö£ΓöÇΓöÇ /P:   ΓöÇΓöÇΓö┤ΓöÇΓöÇ/DW: ΓöÇΓöÇΓöñ      Γö£ΓöÇΓöÇ /EXC ΓöÇΓöÇΓöñ
  483.       Γöé                     Γöé      Γö£ΓöÇΓöÇ /MUL ΓöÇΓöÇΓöñ
  484.       Γö£ΓöÇΓöÇ /MEM: ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ      ΓööΓöÇΓöÇ /SHA ΓöÇΓöÇΓöÿ
  485.       Γö£ΓöÇΓöÇ /DMA: ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  486.       ΓööΓöÇΓöÇ /IRQ: ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  487.  
  488.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  489.   ΓöéSwitch         ΓöéFormat         ΓöéExample        ΓöéDescription    Γöé
  490.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  491.   Γöé/IO:           Γöé/IO:x,x        Γöé/IO:340,4      ΓöéReserve IO     Γöé
  492.   Γöé               Γöé               Γöé               Γöéports. The     Γöé
  493.   Γöé               Γöé               Γöé               Γöéfirst number isΓöé
  494.   Γöé               Γöé               Γöé               Γöéthe base port  Γöé
  495.   Γöé               Γöé               Γöé               Γöéin HEX, and is Γöé
  496.   Γöé               Γöé               Γöé               Γöéfollowed by theΓöé
  497.   Γöé               Γöé               Γöé               Γöélength (number Γöé
  498.   Γöé               Γöé               Γöé               Γöéof ports) in   Γöé
  499.   Γöé               Γöé               Γöé               Γöédecimal format.Γöé
  500.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  501.   Γöé/P:            Γöésame as /IO:   Γöé               Γöé               Γöé
  502.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  503.   Γöé/MEM:          Γöé/MEM:x,x       Γöé/MEM:CA00,1000 ΓöéReserve Memory.Γöé
  504.   Γöé               Γöé               Γöé               ΓöéThe first      Γöé
  505.   Γöé               Γöé               Γöé               Γöénumber is the  Γöé
  506.   Γöé               Γöé               Γöé               Γöébase memory    Γöé
  507.   Γöé               Γöé               Γöé               Γöéaddress (HEX), Γöé
  508.   Γöé               Γöé               Γöé               Γöéwith the       Γöé
  509.   Γöé               Γöé               Γöé               Γöéassumption thatΓöé
  510.   Γöé               Γöé               Γöé               Γöéthe address is Γöé
  511.   Γöé               Γöé               Γöé               ΓöéXXXX:0, and is Γöé
  512.   Γöé               Γöé               Γöé               Γöéfollowed by theΓöé
  513.   Γöé               Γöé               Γöé               Γöélength (number Γöé
  514.   Γöé               Γöé               Γöé               Γöéof address) in Γöé
  515.   Γöé               Γöé               Γöé               Γöédecimal format.Γöé
  516.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  517.   Γöé/DMA:          Γöé/DMA:x         Γöé/DMA:2         ΓöéReserve DMA    Γöé
  518.   Γöé               Γöé               Γöé               ΓöéChannel. The   Γöé
  519.   Γöé               Γöé               Γöé               Γöénumber is in   Γöé
  520.   Γöé               Γöé               Γöé               Γöédecimal format.Γöé
  521.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  522.   Γöé/IRQ:          Γöé/IRQ:x         Γöé/IRQ:13        ΓöéReserve IRQ.   Γöé
  523.   Γöé               Γöé               Γöé               ΓöéThe number is  Γöé
  524.   Γöé               Γöé               Γöé               Γöéin decimal     Γöé
  525.   Γöé               Γöé               Γöé               Γöéformat.        Γöé
  526.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  527.   Γöé/EXC           Γöé/EXC           Γöé/EXC           ΓöéExclusive      Γöé
  528.   Γöé               Γöé               Γöé               Γöéresource       Γöé
  529.   Γöé               Γöé               Γöé               Γöéattribute.     Γöé
  530.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  531.   Γöé/MUL           Γöé/MUL           Γöé/MUL           ΓöéMultiplexed    Γöé
  532.   Γöé               Γöé               Γöé               Γöéresource       Γöé
  533.   Γöé               Γöé               Γöé               Γöéattribute.     Γöé
  534.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  535.   Γöé/SHA           Γöé/SHA           Γöé/SHA           ΓöéShared resourceΓöé
  536.   Γöé               Γöé               Γöé               Γöéattribute.     Γöé
  537.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  538.   Γöé/DW:           Γöé/DW:x          Γöé/DW:10         ΓöéDecode width ofΓöé
  539.   Γöé               Γöé               Γöé               ΓöéIO address.    Γöé
  540.   Γöé               Γöé               Γöé               ΓöéValid numbers  Γöé
  541.   Γöé               Γöé               Γöé               Γöéare 10 and 16. Γöé
  542.   Γöé               Γöé               Γöé               ΓöéOnly valid withΓöé
  543.   Γöé               Γöé               Γöé               Γöé/IO: switch.   Γöé
  544.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  545.  
  546.  More than one resource attribute per-resource entry is an error and is not 
  547.  allowed. If no attributes or decode width is set, the default is EXCLUSIVE and 
  548.  16. For example, to reserve IRQ 13 EXCLUSIVE, DMA 0 SHARED, MEMORY CA00:0 for 
  549.  1000 bytes shared, IO ports 340 for 10 ports EXCLUSIVE and decode width 16, 
  550.  and IO ports 300 for 64 ports, with a decode width of 10: 
  551.  
  552.   BASEDEV=RESERVE.SYS /IRQ:13 /DMA:0 /SHA /MEM:CA00,1000 /SHA /IO:340,10 /IO:300,64 /DW:10
  553.  
  554.  
  555. ΓòÉΓòÉΓòÉ 5. Linking Resource Manager Services ΓòÉΓòÉΓòÉ
  556.  
  557. This section discusses the programming considerations of adding Resource 
  558. Management services to your driver. 
  559.  
  560. The OS/2 Resource Manager consists of two components: RESOURCE.SYS and 
  561. RMCALLS.LIB. 
  562.  
  563.  
  564. ΓòÉΓòÉΓòÉ 5.1. RESOURCE.SYS ΓòÉΓòÉΓòÉ
  565.  
  566. RESOURCE.SYS is a base device driver. In OS/2 Warp and subsequent versions, 
  567. this driver is provided as part of the product and is loaded automatically 
  568. without an explicit CONFIG.SYS BASEDEV= statement. 
  569.  
  570.  
  571. ΓòÉΓòÉΓòÉ 5.2. RMCALLS.LIB ΓòÉΓòÉΓòÉ
  572.  
  573. This library is linked with your device driver and provides the interface code 
  574. to communicate with the RESOURCE.SYS driver. In addition, the RMCALLS library 
  575. will provide rudimentary support for the following subset of Resource Manager 
  576. services. 
  577.  
  578.  RMCreateDriver           RMDestroyDriver 
  579.  
  580.  RMCreateAdapter          RMDestroyAdapter 
  581.  
  582.  RMCreateDevice           RMDestroyDevice 
  583.  
  584.  RMCreateLDev             RMDestroyLDev 
  585.  
  586.  RMCreateSysName          RMDestroySysName 
  587.  
  588.  RMAllocResource          RMDeallocResource 
  589.  
  590.  In general, this support consists of returning a handle value of -1L and a 
  591.  return code of RMRC_SUCCESS as applicable. This support is enabled when your 
  592.  driver is run on a system that does not have RESOURCE.SYS installed, such as 
  593.  an earlier version of OS/2. 
  594.  
  595.  
  596. ΓòÉΓòÉΓòÉ 5.2.1. RMCALLS Library Data ΓòÉΓòÉΓòÉ
  597.  
  598. The RMCALLS library references the following four variables: 
  599.  
  600.       PFN Device_Help; 
  601.       ULONG RMFlags  = NULL; 
  602.       PFNRM RM_Help0  = NULL; 
  603.       PFNRM RM_Help3  = NULL; 
  604.  
  605.  The PFN Device_Help variable must be initialized by your driver prior to 
  606.  calling any Resource Manager services. It is expected to contain the Device 
  607.  Help entry point provided in the OS/2 Init Request Packet your driver 
  608.  receives. 
  609.  
  610.  Prior to calling any Resource Manager services, the remaining data variables 
  611.  must be initialized to zero. Specify C-initializers when declaring the 
  612.  variables. 
  613.  
  614.  These variables must be allocated by your driver. If you plan to use Resource 
  615.  Manager services after your driver has completed initialization, you must 
  616.  ensure that these variables are not discarded. 
  617.  
  618.  Note:  If you do not declare these variables, a linker error message will 
  619.         occur, indicating that they are missing. 
  620.  
  621.  
  622. ΓòÉΓòÉΓòÉ 5.2.2. RMCALLS Library Code ΓòÉΓòÉΓòÉ
  623.  
  624. The code portion of the RMCALLS library is included in a segment named RMCode. 
  625. There are three alternatives in handling the code in this segment: 
  626.  
  627.    o  Combine RMCode with your driver's default code segment if your driver 
  628.       does not intend to use Resource Manager services after initialization. 
  629.       Because the library code is linked after OBJ text, it would be discarded 
  630.       as your driver discards its initialization code. 
  631.  
  632.    o  Combine RMCode with your driver's swappable code segment. If your driver 
  633.       intends to use Resource Manager services after its initialization and has 
  634.       a swappable code segment, then combine RMCode with this segment. 
  635.  
  636.    o  Place RMCode in its own swappable segment. If your driver does not have a 
  637.       swappable code segment, then the RMCode will reside in its own swappable 
  638.       segment by default. 
  639.  
  640.  
  641. ΓòÉΓòÉΓòÉ 5.3. Resource Manager Services ΓòÉΓòÉΓòÉ
  642.  
  643. The following Resource Manager services are grouped functionally and are 
  644. provided by a library. The information in this library can be found in Linking 
  645. Resource Manager Services. 
  646.  
  647.  
  648. ΓòÉΓòÉΓòÉ 5.3.1. Physical Node Management ΓòÉΓòÉΓòÉ
  649.  
  650. The following services create driver, adapter, and device nodes: 
  651.  
  652.    o  RMCreateDriver (see RMCreateDriver - Obtain a Driver Handle) 
  653.    o  RMCreateAdapter (see RMCreateAdapter - Obtain an Adapter Handle) 
  654.    o  RMCreateDevice (see RMCreateDevice - Obtain a Device Handle) 
  655.  
  656.  The following services delete driver, adapter, and device nodes: 
  657.  
  658.    o  RMDestroyDriver (see RMDestroyDriver - Destroy a Driver Handle) 
  659.    o  RMDestroyAdapter (see RMDestroyAdapterHandle - Destroy an Adapter Handle) 
  660.    o  RMDestroyDevice (see RMDestroyDevice - Destroy a Device Handle) 
  661.  
  662.  
  663. ΓòÉΓòÉΓòÉ 5.3.2. Resource Management ΓòÉΓòÉΓòÉ
  664.  
  665. The following services allocate or deallocate resources: 
  666.  
  667.    o  RMAllocResource (see RMAllocResource - Obtain a Resource Handle) 
  668.    o  RMDeallocResource (see RMDeAllocResource - Destroy a Resource Handle) 
  669.  
  670.  The following service edits existing device or adapter resource sets by adding 
  671.  or removing resources: 
  672.  
  673.    o  RMModifyResources (see RMModifyResources - Modify Adapter or Device 
  674.       Resource Sets) 
  675.  
  676.  
  677. ΓòÉΓòÉΓòÉ 5.3.3. Node Searches ΓòÉΓòÉΓòÉ
  678.  
  679. The following service searches for nodes matching a particular key: 
  680.  
  681.    o  RMKeyToHandleList (see RMKeyToHandleList - Search for the Specified 
  682.       Adapter/Device/LDev Key) 
  683.  
  684.  The following service searches for nodes using a particular resource: 
  685.  
  686.    o  RMResToHandleList (see RMResToHandleList - Return List of Adapter/Device 
  687.       Handles That Own a Resource) 
  688.  
  689.  The following service searches for nodes containing matching adjunct data: 
  690.  
  691.    o  RMAdjToHandleList (see RMAdjToHandleList - Update an Adjunct Data 
  692.       Structure) 
  693.  
  694.  The following service returns the LDEV associated with a physical device node: 
  695.  
  696.    o  RMHDevtoHLDev (see RMHDevToHLDev - Return Physical Device Associated with 
  697.       Logical Device) 
  698.  
  699.  
  700. ΓòÉΓòÉΓòÉ 5.3.4. Node Information ΓòÉΓòÉΓòÉ
  701.  
  702. The following service provides the type of node with which the handle is 
  703. associated: 
  704.  
  705.    o  RMHandleToType (see RMHandleToType - Return the Type of Resource Manager 
  706.       Handle) 
  707.  
  708.  The following service returns the handle of the node's parent: 
  709.  
  710.    o  RMHandleToParent (see RMHandleToParent - Return a Parent Handle) 
  711.  
  712.  The following service returns the contents of the Resource Manager node 
  713.  indicated by the handle: 
  714.  
  715.    o  RMGetNodeInfo (see RMGetNodeInfo - Return Resource Manager Node 
  716.       Information) 
  717.  
  718.  
  719. ΓòÉΓòÉΓòÉ 5.3.5. Logical Node Management ΓòÉΓòÉΓòÉ
  720.  
  721. The following services create or destroy a logical device node: 
  722.  
  723.    o  RMCreateLDev (see RMCreateLDev - Obtain a Logical Device Handle Adapter) 
  724.    o  RMDestroyLDev (see RMDestroyLDev - Destroy a Logical Device Handle) 
  725.  
  726.  The following services create or destroy a system name node: 
  727.  
  728.    o  RMCreateSysName (see RMCreateSysName - Obtain a System Name Handle) 
  729.    o  RMDestroySysName (see RMDestroySysName - Destroy a System Name Handle) 
  730.  
  731.  The following service creates a pseudo device representing a group of physical 
  732.  devices: 
  733.  
  734.    o  RMCreateLinkDevice (see RMCreateLDev - Obtain a Logical Device Handle 
  735.       Adapter) 
  736.  
  737.  
  738. ΓòÉΓòÉΓòÉ 5.4. Return Codes ΓòÉΓòÉΓòÉ
  739.  
  740. This section describes Resource Manager return codes. All Resource Manager 
  741. services return a 16-bit return code. 
  742.  
  743.  RMRC_SUCCESS                  The Resource Manager service is successfully 
  744.                                completed. 
  745.  
  746.                                In cases where the Resource Management driver 
  747.                                (RESOURCE.SYS) is not installed, some of the 
  748.                                basic Resource Management services will return 
  749.                                RMRC_SUCCESS, but do not perform an operation. 
  750.  
  751.                                The purpose of the use of this return code, 
  752.                                however, is to allow the use of the same device 
  753.                                driver across various OS/2 versions without the 
  754.                                driver having to check specific return codes 
  755.                                indicating whether the Resource Manager is 
  756.                                available. 
  757.  
  758.  RMRC_NOTINITIALIZED           A Resource Management library was not properly 
  759.                                initialized. A device driver must call 
  760.                                RMCreateDriver prior to issuing any other 
  761.                                Resource Management service. 
  762.  
  763.  RMRC_BAD_DRIVERHANDLE 
  764.  
  765.  RMRC_BAD_ADAPTERHANDLE 
  766.  
  767.  RMRC_BAD_DEVICEHANDLE 
  768.  
  769.  RMRC_BAD_RESOURCEHANDLE 
  770.  
  771.  RMRC_BAD_LDEVHANDLE 
  772.  
  773.  RMRC_BAD_SYSNAMEHANDLE        The expected Resource Manager handles were not 
  774.                                provided because the handle was not a valid 
  775.                                Resource Manager handle or the handle did not 
  776.                                point to the type of object the service 
  777.                                required. 
  778.  
  779.                                The individual return codes indicate the type of 
  780.                                handle that was expected. 
  781.  
  782.  RMRC_BAD_DEVHELP              The Resource Management library requires the 
  783.                                C-variable (Device_Help) to be initialized to 
  784.                                the Device Help entry point prior to issuing the 
  785.                                first Resource Management service call. 
  786.  
  787.  RMRC_NULL_POINTER             A Resource Manager service received a NULL value 
  788.                                for a pointer that was expected to contain a 
  789.                                valid 16:16 address. 
  790.  
  791.  RMRC_NULL_STRINGS             A descriptive text pointer in a DRIVERSTRUCT, 
  792.                                ADAPTERSTRUCT, or DEVICESTRUCT datatype was 
  793.                                found to be NULL rather than pointing to the 
  794.                                expected ASCIIZ text data. 
  795.  
  796.  RMRC_BAD_VERSION              The Resource Manager level indicated on the 
  797.                                RMCreateDriver service is not supported by the 
  798.                                Resource Management driver currently installed 
  799.                                because it is a a downlevel version of the 
  800.                                Resource Management driver (RESOURCE.SYS), or 
  801.                                the MajorVer/MinorVer fields of DRIVERSTRUCT 
  802.                                were not properly initialized. 
  803.  
  804.                                Refer to RMCreateDriver - Obtain a Driver Handle 
  805.                                for further information. 
  806.  
  807.  RMRC_RES_ALREADY_CLAIMED      The requested resource is allocated exclusively 
  808.                                to another driver, or the requested sharing mode 
  809.                                conflicts with the sharing mode of other owners 
  810.                                of the resource. 
  811.  
  812.  RMRC_INVALID_PARM_VALUE       A nonhandle or nonpointer variable contains an 
  813.                                invalid or out-of-range value because: 
  814.  
  815.    o  An invalid decode width was specified when allocating an I/O Port range. 
  816.  
  817.    o  A handle search is being performed with cMaxHandles set to 0. 
  818.  
  819.  RMRC_OUT_OF_MEMORY            The Resource Manager is out of memory. 
  820.  
  821.  RMRC_BUFFER_TOO_SMALL         The buffer provided to receive information from 
  822.                                a Resource Manager service was too small. 
  823.  
  824.  RMRC_IRQ_ENTRY_ILLEGAL        A Resource Manager service was issued at 
  825.                                interrupt time. The Resource Manager service 
  826.                                request can be issued only at task time or INIT 
  827.                                time. 
  828.  
  829.  RMRC_NOT_IMPLEMENTED          The Resource Manager service requested is not 
  830.                                implemented in the version of the Resource 
  831.                                Manager you are currently using. 
  832.  
  833.  RMRC_NOT_INSTALLED            The Resource Management driver (RESOURCE.SYS) is 
  834.                                required to service this request but is not 
  835.                                installed. 
  836.  
  837.  
  838. ΓòÉΓòÉΓòÉ 5.5. RMADDToHDevice - Map an ADD/DM Handle to a Resource Manager Device Handle ΓòÉΓòÉΓòÉ
  839.  
  840. This service converts an ADD/DM ADD Handle and ADD/DM UnitHandle to a 
  841. corresponding Resource Manager device handle. This is done by searching the 
  842. Resource Manager physical device tree for a node that contains an ADJ_ADD_UNIT 
  843. adjunct, which matches the supplied ADD Handle and ADD UnitHandle. 
  844.  
  845.  
  846. ΓòÉΓòÉΓòÉ 5.5.1. Calling Sequence ΓòÉΓòÉΓòÉ
  847.  
  848.  
  849.          rc = RMADDToHDevice( (PHDEVICE)  &hDevice,
  850.                               (USHORT)    ADDHandle,
  851.                               (USHORT)    UnitHandle );
  852.  
  853.  
  854. ΓòÉΓòÉΓòÉ 5.5.2. Calling Parameters ΓòÉΓòÉΓòÉ
  855.  
  856.            &hDevice (PHDEVICE) 
  857.                 Pointer to variable to receive device handle of device with a 
  858.                 matching ADDHandle and UnitHandle. 
  859.  
  860.            ADDHandle (USHORT) 
  861.                 Handle of the ADD driver assigned by 
  862.                 DevHelp_RegisterDeviceClass. 
  863.  
  864.            UnitHandle (USHORT) 
  865.                 UnitHandle the ADD driver assigned to this device. 
  866.  
  867.  
  868. ΓòÉΓòÉΓòÉ 5.5.3. Returns ΓòÉΓòÉΓòÉ
  869.  
  870. On systems where the Resource Manager driver is not installed, the library 
  871. interface code will return RMRC_NOT_INSTALLED and will set hDevice to -1L. 
  872.  
  873.  
  874. ΓòÉΓòÉΓòÉ 5.5.4. Remarks ΓòÉΓòÉΓòÉ
  875.  
  876. Use RMAdjToHandleList rather than this service to maintain compatibility with 
  877. future Resource Manager releases. This service will be removed in a future 
  878. Resource Manager release. 
  879.  
  880. Refer to the Storage Device Driver Reference for additional information on 
  881. ADD/DM architecture. 
  882.  
  883.  
  884. ΓòÉΓòÉΓòÉ 5.6. RMAdjToHandleList - Update an Adjunct Data Structure ΓòÉΓòÉΓòÉ
  885.  
  886. This service searches for Resource Manager nodes that match the adjunct 
  887. structure specified. A list of node handles and adjunct indices are in the 
  888. HandleList structure provided by the caller. 
  889.  
  890.  
  891. ΓòÉΓòÉΓòÉ 5.6.1. Calling Sequence ΓòÉΓòÉΓòÉ
  892.  
  893.  
  894.          rc = RMAdjToHandleList( (PADJUNCT)       &AdjunctData,
  895.                                  (HADAPTER)       hStartNode
  896.                                  (PAJDHANDLELIST) &AdjHandleList );
  897.  
  898.  
  899. ΓòÉΓòÉΓòÉ 5.6.2. Calling Parameters ΓòÉΓòÉΓòÉ
  900.  
  901.            &AdjunctData (PADJUNCT) 
  902.                 Pointer to an adjunct structure to search for. 
  903.  
  904.                 The ADJUNCT type contains a union of data structures of varying 
  905.                 lengths. When searching for a particular adjunct, set the 
  906.                 length field of the AdjunctData structure that was passed, to 
  907.                 the exact length of the adjunct structure being located. For 
  908.                 example: 
  909.  
  910.                               /* Correct */
  911.  
  912.                                AdjData.AdjLength = ADJ_HEADER_SIZE + sizeof(ADD_UNIT);
  913.  
  914.                              /* Incorrect */
  915.  
  916.                               AdjData.AdjLength = sizeof(ADJUNCT);
  917.  
  918.            hStartNode (HADAPTER) 
  919.                 Handle of resource manager node at which to start the search. 
  920.  
  921.            &AdjHandleList (PADJHANDLELIST) 
  922.                 Pointer to the following structure: 
  923.  
  924.  
  925.                                 ADJHANDLELIST struct
  926.                                               {
  927.                                                 USHORT        cMaxHandles;
  928.                                                 USHORT        cHandles;
  929.                                                 ADJINFO       Adj[1];
  930.                                               };
  931.  
  932.                                 ADJINFO struct
  933.                                         {
  934.                                           HADAPTER    hAdapter;
  935.                                           USHORT      AdjIndex;
  936.                                         };
  937.  
  938.                 cMaxHandles (USHORT) 
  939.                      Number of handles that can be accepted in the handles 
  940.                      array. This field must be set by the caller. 
  941.  
  942.                      The default ADJHANDLELIST type provides room for one 
  943.                      handle. In this case, cMaxHandles must be set to 1. Refer 
  944.                      to the example in RMKeyToHandleList - Search for the 
  945.                      Specified Adapter/Device/LDev Key, if more than one 
  946.                      Adjunct handle is expected. 
  947.  
  948.                 cHandles (USHORT) 
  949.                      Actual handle count found. This field must be initially 
  950.                      set to zero by the caller. 
  951.  
  952.                      The number of handles reported by this field may exceed 
  953.                      cMaxHandles. This indicates that the HandleList structure 
  954.                      supplied was too small. The count will be set to the 
  955.                      number of handles actually found. 
  956.  
  957.                 Adj[ ] (ADJINFO) 
  958.                      Array of ADJINFO structures. The ADJINFO structure 
  959.                      contains the following fields: 
  960.  
  961.                      hAdapter (HADAPTER) 
  962.                           Handle of the owner of the adjunct data that matches 
  963.                           the adjunct specified. 
  964.  
  965.                      AdjIndex (USHORT) 
  966.                           Index of the adjunct structure found. 
  967.  
  968.  
  969. ΓòÉΓòÉΓòÉ 5.6.3. Returns ΓòÉΓòÉΓòÉ
  970.  
  971. On systems where the resource manager driver is not installed, the library 
  972. interface code will return RMRC_NOT_INSTALLED. 
  973.  
  974.  
  975. ΓòÉΓòÉΓòÉ 5.7. RMAllocResource - Obtain a Resource Handle ΓòÉΓòÉΓòÉ
  976.  
  977. This service allows a driver to register usage of a hardware resource. 
  978.  
  979.  
  980. ΓòÉΓòÉΓòÉ 5.7.1. Calling Sequence ΓòÉΓòÉΓòÉ
  981.  
  982.  
  983.          rc = RMAllocResource( (HDRIVER)         hDriver,
  984.                                (PHRESOURCE)      &hResource,
  985.                                (PRESOURCESTRUCT) &ResourceStruct );
  986.  
  987.  
  988. ΓòÉΓòÉΓòÉ 5.7.2. Calling Parameters ΓòÉΓòÉΓòÉ
  989.  
  990.            hDriver (HDRIVER) 
  991.                 Driver handle of the device driver requesting the resource. 
  992.  
  993.            &hResource (PHRESOURCE) 
  994.                 Pointer to the variable to receive the returned resource 
  995.                 handle. 
  996.  
  997.            &ResourceStruct 
  998.                 Pointer to the following structure: 
  999.  
  1000.                                 RESOURCESTRUCT    struct
  1001.                                                   {
  1002.                                                     ULONG ResourceType;
  1003.                                                     union
  1004.                                                     {
  1005.                                                       IORESOURCE   IOResource;
  1006.                                                       IRQRESOURCE  IRQResource;
  1007.                                                       MEMRESOURCE  MEMResource;
  1008.                                                       DMARESOURCE  DMAResource;
  1009.                                                       TMRRESOURCE  TMRResource;
  1010.                                                     };
  1011.                                                     ULONG  Reserved;
  1012.                                                   };
  1013.  
  1014.                 ResourceType (ULONG) 
  1015.                      Type of resource being requested. 
  1016.  
  1017.                      The resource structure contained in the union must match 
  1018.                      the type of resource indicated by this field. 
  1019.  
  1020.                                           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1021.                                           ΓöéResource Requested  ΓöéResource Type       ΓöéResource Structure  Γöé
  1022.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1023.                                           ΓöéI/O Port Range      ΓöéRS_TYPE_I/O         ΓöéIORESOURCE          Γöé
  1024.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1025.                                           ΓöéIRQ Level           ΓöéRS_TYPE_IRQ         ΓöéIRQRESOURCE         Γöé
  1026.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1027.                                           ΓöéBIOS Memory Region  ΓöéRS_TYPE_MEM         ΓöéMEMRESOURCE         Γöé
  1028.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1029.                                           ΓöéDMA Channel         ΓöéRS_TYPE_DMA         ΓöéDMARESOURCE         Γöé
  1030.                                           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1031.                                           ΓöéTimer Channel       ΓöéRS_TYPE_TIMER       ΓöéTMRRESOURCE         Γöé
  1032.                                           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1033.  
  1034.                 IOResource (IORESOURCE) 
  1035.                      For ResourceType = RS_TYPE_IO, the union contains the 
  1036.                      following structure: 
  1037.  
  1038.                                           IORESOURCE  struct
  1039.                                                       {
  1040.                                                         USHORT BaseIOPort;
  1041.                                                         USHORT NumIOPorts;
  1042.                                                         USHORT IOFlags;
  1043.                                                         USHORT IOAddressLines;
  1044.                                                       };
  1045.  
  1046.                      BaseIOPort 
  1047.                           Specifies the start of the I/O Port range requested. 
  1048.                           If a search is being performed, then this field is 
  1049.                           considered the starting point for the search. 
  1050.  
  1051.                      NumIOPorts 
  1052.                           Specifies number of contiguous I/O Ports requested. 
  1053.  
  1054.                      IOFlags 
  1055.                           One of the following sharing mode flags must be 
  1056.                           specified: 
  1057.  
  1058.                           RS_IO_EXCLUSIVE 
  1059.                           RS_IO_MULTIPLEXED 
  1060.                           RS_IO_SHARED 
  1061.                           RS_IO_GRANT_YIELD 
  1062.  
  1063.                      See Managing System Resources for a description of 
  1064.                      resource sharing modes. 
  1065.  
  1066.                      If a device driver and supported adapter is capable of 
  1067.                      selecting a new I/O range and is participating in 
  1068.                      Grant-Yield protocols, then the following flag indicates 
  1069.                      the driver will accept reconfiguration requests for this 
  1070.                      resource: 
  1071.  
  1072.                                           RS_IO_RECONFIGURE
  1073.  
  1074.                      If a search is to be performed, the following flag must be 
  1075.                      specified: 
  1076.  
  1077.                                           RS_SEARCH
  1078.  
  1079.                      When a search is performed and is successful, the 
  1080.                      BaseIOPort field will be updated to indicate the start of 
  1081.                      the allocated I/O Port range. 
  1082.  
  1083.                      The port range returned will be aligned on 2^n boundary >= 
  1084.                      NumIOPorts. 
  1085.  
  1086.                      IOAddressLines 
  1087.                           Specifies the number of address lines the adapter can 
  1088.                           decode. This field must contain the value 10 or 16. 
  1089.  
  1090.                           Most current-generation 16-bit adapters decode all 16 
  1091.                           I/O address lines. PC-XT* and some early 16-bit 
  1092.                           adapters decode only 10 address lines. 
  1093.  
  1094.                           Adapters that do not fully decode appear in multiple 
  1095.                           places in the I/O address space because they ignore 
  1096.                           the high-order I/O address bits. 
  1097.  
  1098.                           Note:  Port allocations outside the ISA compatibility 
  1099.                                  range (100h - 3FFh) must indicate 
  1100.                                  IOAddressLines = 16. 
  1101.  
  1102.                 IRQResource (IRQRESOURCE) 
  1103.                      For ResourceType = RS_TYPE_IRQ, the union contains the 
  1104.                      following structure: 
  1105.  
  1106.                                           IRQRESOURCE   struct
  1107.                                                        {
  1108.                                                          USHORT   IRQLevel ;
  1109.                                                          USHORT   PCIIrqPin ;
  1110.                                                          USHORT   IRQFlags ;
  1111.                                                          USHORT   Reserved ;
  1112.                                                          PFNRMINTHANDLER  pfnIntHandler ;
  1113.                                                        } ;
  1114.  
  1115.                      IRQLevel 
  1116.                           Specifies requested IRQ Level (0-15). 
  1117.  
  1118.                      PCIIrqPin 
  1119.                           For PCI devices, set to one of the following values 
  1120.                           based on the PCI Interrupt Pin assigned to the 
  1121.                           device. 
  1122.  
  1123.                                                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1124.                                                     ΓöéPCI Interrupt Pin             ΓöéPCIIrqPin Value               Γöé
  1125.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1126.                                                     ΓöéNone                          ΓöéRS_PCI_INT_NONE               Γöé
  1127.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1128.                                                     ΓöéA                             ΓöéRS_PCI_INT_A                  Γöé
  1129.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1130.                                                     ΓöéB                             ΓöéRS_PCI_INT_B                  Γöé
  1131.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1132.                                                     ΓöéC                             ΓöéRS_PCI_INT_C                  Γöé
  1133.                                                     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1134.                                                     ΓöéD                             ΓöéRS_PCI_INT_D                  Γöé
  1135.                                                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1136.  
  1137.                           For non-PCI devices, this field must be set to zero. 
  1138.                           This entry is provided for information only. No 
  1139.                           conflict determination occurs with this entry. 
  1140.  
  1141.                      IRQFlags 
  1142.                           One of the following sharing-mode flags must be 
  1143.                           specified: 
  1144.  
  1145.                           RS_IRQ_EXCLUSIVE 
  1146.                           RS_IRQ_MULTIPLEXED 
  1147.                           RS_IRQ_SHARED 
  1148.                           RS_IRQ_GRANT_YIELD 
  1149.  
  1150.                      See Managing System Resources for a description of 
  1151.                      resource sharing modes. 
  1152.  
  1153.                      pfnIntHandler 
  1154.                           This field is reserved for future use and must be set 
  1155.                           to zero. 
  1156.  
  1157.                 MEMResource (MEMRESOURCE) 
  1158.                      For ResourceType = RS_TYPE_MEM, the union contains the 
  1159.                      following structure: 
  1160.  
  1161.                                           MEMRESOURCE  struct
  1162.                                                        {
  1163.                                                          ULONG  MemBase;
  1164.                                                          ULONG  MemSize;
  1165.                                                          USHORT MemFlags;
  1166.                                                          USHORT ReservedAlign;
  1167.                                                        };
  1168.  
  1169.                      MemBase 
  1170.                           Specifies the start of the BIOS memory region 
  1171.                           requested as physical address. If a search is being 
  1172.                           performed, then this is the starting point for the 
  1173.                           search. 
  1174.  
  1175.                      MemSize 
  1176.                           Specifies the size of the BIOS memory region 
  1177.                           requested in bytes. 
  1178.  
  1179.                      MemFlags 
  1180.                           One of the following sharing-mode flags must be 
  1181.                           specified: 
  1182.  
  1183.                           RS_MEM_EXCLUSIVE 
  1184.                           RS_MEM_MULTIPLEXED 
  1185.                           RS_MEM_SHARED 
  1186.                           RS_MEM_GRANT_YIELD 
  1187.  
  1188.                      See Managing System Resources for a description of 
  1189.                      resource-sharing modes. If a device driver and adapter are 
  1190.                      capable of selecting a new memory range and are 
  1191.                      participating in Grant-Yield protocols, then the following 
  1192.                      flag indicates the driver will accept reconfiguration 
  1193.                      requests for this resource: 
  1194.  
  1195.                                                      RS_MEM_RECONFIGURE
  1196.  
  1197.                      If a search is to be performed, the following flag must be 
  1198.                      specified: 
  1199.  
  1200.                                                      RS_SEARCH
  1201.  
  1202.                      When a search is performed and is successful, the MemBase 
  1203.                      field will be updated to indicate the start of the 
  1204.                      allocated memory range. 
  1205.  
  1206.                 DMAResource (DMARESOURCE) 
  1207.                      For ResourceType = RS_TYPE_DMA, the union contains the 
  1208.                      following structure: 
  1209.  
  1210.  
  1211.                                           DMARESOURCE struct
  1212.                                                       {
  1213.                                                         USHORT DMAChannel;
  1214.                                                         USHORT DMAFlags;
  1215.                                                       };
  1216.  
  1217.                      DMAChannel 
  1218.                           Specifies the number of the DMA Channel requested 
  1219.                           (0-7). 
  1220.  
  1221.                      DMAFlags 
  1222.                           One of the following sharing-mode flags must be 
  1223.                           specified: 
  1224.  
  1225.                           RS_DMA_EXCLUSIVE 
  1226.                           RS_DMA_MULTIPLEXED 
  1227.                           RS_DMA_SHARED 
  1228.                           RS_DMA_GRANT_YIELD 
  1229.  
  1230.                      See Managing System Resources for a description of 
  1231.                      resource-sharing modes. 
  1232.  
  1233.                 TMRResource (TMRRESOURCE) 
  1234.                      For ResourceType = RS_TYPE_TIMER, the union contains the 
  1235.                      following structure: 
  1236.  
  1237.  
  1238.                                           TMRRESOURCE  struct
  1239.                                                        {
  1240.                                                          USHORT TMRChannel;
  1241.                                                          USHORT TMRFlags;
  1242.                                                        };
  1243.  
  1244.                      TMRChannel 
  1245.                           Specifies the number of the timer channel requested 
  1246.                           (0-2). 
  1247.  
  1248.                      TMRFlags 
  1249.                           One of the following sharing mode flags must be 
  1250.                           specified: 
  1251.  
  1252.                           RS_TMR_EXCLUSIVE 
  1253.                           RS_TMR_MULTIPLEXED 
  1254.                           RS_TMR_SHARED 
  1255.                           RS_TMR_GRANT_YIELD 
  1256.  
  1257.                      See Managing System Resources for a description on 
  1258.                      resource-sharing modes. 
  1259.  
  1260.  
  1261. ΓòÉΓòÉΓòÉ 5.7.3. Returns ΓòÉΓòÉΓòÉ
  1262.  
  1263. On systems where the Resource Manager driver is not installed, the library 
  1264. interface code will return RMRC_SUCCESS and a resource handle of -1L. 
  1265.  
  1266.  
  1267. ΓòÉΓòÉΓòÉ 5.7.4. Remarks ΓòÉΓòÉΓòÉ
  1268.  
  1269. Prior to making any attempt to access the resource, a driver must issue this 
  1270. call and successfully obtain ownership of a resource. This call includes 
  1271. non-destructive (read-type) accesses. 
  1272.  
  1273. For I/O and BIOS memory resources, RMAllocResource searches to locate an 
  1274. available I/O or memory region that is supported. The resource to be allocated 
  1275. is described in a RESOURCESTRUCT, which contains a C-union of structures that 
  1276. are resource-type specific. This service returns a resource handle (HRESOURCE) 
  1277. that is used to identify usage of the resource by this driver. 
  1278.  
  1279. Resources are initially assigned to the driver that is issuing the 
  1280. RMAllocResource request. By using hardware probing, the driver determines if 
  1281. the hardware it intends to support is installed. 
  1282.  
  1283. When the driver determines that a supported adapter is present, it registers an 
  1284. adapter (RMCreateAdapter) and assigns resource handles by providing a list of 
  1285. resource handles in the RMCreateAdapter service request. 
  1286.  
  1287. If an adapter is not found, resources that are not assigned to a device or 
  1288. adapter must be released. See RMDeAllocResource - Destroy a Resource Handle. 
  1289.  
  1290.  
  1291. ΓòÉΓòÉΓòÉ 5.8. RMCreateAdapter - Obtain an Adapter Handle ΓòÉΓòÉΓòÉ
  1292.  
  1293. This service allows a driver to register an adapter with the Resource Manager. 
  1294. An adapter handle (HADAPTER) is returned by this service to identify the 
  1295. adapter. Information about the adapter being registered is passed in an 
  1296. ADAPTERSTRUCT. 
  1297.  
  1298. When an adapter is registered, a list of resource handles representing hardware 
  1299. resources used by this adapter may be optionally passed. 
  1300.  
  1301.  
  1302. ΓòÉΓòÉΓòÉ 5.8.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1303.  
  1304.  
  1305.          rc = RMCreateAdapter( (HDRIVER)        hDriver,
  1306.                                (PHADAPTER)      &hAdapter
  1307.                                (PADAPTERSTRUCT) &AdapterStruct,
  1308.                                (HDEVICE)        hParentDevice,
  1309.                                (PAHRESOURCE)    &ResourceList  );
  1310.  
  1311.  
  1312. ΓòÉΓòÉΓòÉ 5.8.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1313.  
  1314.            hDriver (HDRIVER) 
  1315.                 Driver handle of the device driver creating this adapter. 
  1316.  
  1317.            &hAdapter (PHADAPTER) 
  1318.                 Pointer to the variable to receive the returned adapter handle. 
  1319.  
  1320.            &AdapterStruct 
  1321.                 Pointer to the following structure: 
  1322.  
  1323.  
  1324.                                 ADAPTERSTRUCT struct
  1325.                                               {
  1326.                                                 PSZ          AdaptDescriptName;
  1327.                                                 USHORT       AdaptFlags;
  1328.                                                 USHORT       BaseType;
  1329.                                                 USHORT       SubType;
  1330.                                                 USHORT       InterfaceType;
  1331.                                                 USHORT       HostBusType;
  1332.                                                 USHORT       HostBusWidth;
  1333.                                                 PADJUNCT     pAdjunctList;
  1334.                                                 ULONG        Reserved;
  1335.                                               };
  1336.  
  1337.                 AdaptDescriptName (PSZ) 
  1338.                      Pointer to an ASCIIZ string containing the adapter key and 
  1339.                      a brief description of the adapter. For example: 
  1340.  
  1341.  
  1342.                                                      "FLOPPY_#  Diskette Controller"
  1343.  
  1344.                      Note:  Up to the first 16 non blank characters are used as 
  1345.                             a key to locate this adapter. The RMCreateAdapter 
  1346.                             service will substitute the "#" character with the 
  1347.                             adapter number supplied in the adjunct list. 
  1348.  
  1349.                      See Device Adapter Keys for additional information 
  1350.                      concerning device adapter keys. 
  1351.  
  1352.                 AdaptFlags (USHORT) 
  1353.                      Adapter attribute flags. Unused flags must be set to zero 
  1354.                      by the caller. 
  1355.  
  1356.                      The following is a valid flag value: 
  1357.  
  1358.  
  1359.                                                  AS_16MB_ADDRESS_LIMIT
  1360.  
  1361.                      The adapter does not support data transfers to storage 
  1362.                      above 16MB (24-bit addressing limit). 
  1363.  
  1364.                 The following three fields provide a category of the adapter 
  1365.                 being created: Refer to RMBASE.H for a complete list of adapter 
  1366.                 categories. 
  1367.  
  1368.                 BaseType (USHORT) 
  1369.                      Indicates the general functional category of the adapter: 
  1370.  
  1371.                      AS_BASE_MSD      Mass storage including disk, tape, 
  1372.                                       CD-ROM, and so forth. 
  1373.  
  1374.                      AS_BASE_COMM     Communications, including serial and 
  1375.                                       parallel ports. 
  1376.  
  1377.                      AS_BASE_PERIPH   System board components, including DMA 
  1378.                                       controllers, interrupt controller, and so 
  1379.                                       forth. 
  1380.  
  1381.                 Subtype (USHORT) 
  1382.                      Indicates the interface supported by the adapter. For 
  1383.                      example: 
  1384.  
  1385.                      SCSI Adapter   AS_BASE_MSD/AS_SUB_SCSI 
  1386.                      IDE Adapter    AS_BASE_MSD/AS_SUB_IDE 
  1387.                      Serial Port    AS_BASE_COMM/AS_SUB_SERIAL 
  1388.                      Parallel Port  AS_BASE_COMM/AS_SUB_PARALLEL 
  1389.  
  1390.                 InterfaceType (USHORT) 
  1391.                      Provides specific interface information. For example: 
  1392.  
  1393.                      Parallel Port  AS_BASE_COMM/AS_SUB_PARALLEL/AS_INTF_ECP 
  1394.  
  1395.                      The following two fields describe the host bus that the 
  1396.                      adapter supports. The fields also describe how the adapter 
  1397.                      is connected to the host system rather than how the 
  1398.                      adapter is connected to the devices it supports: 
  1399.  
  1400.                 HostBusType 
  1401.                      Describes how the adapter is attached to the host system, 
  1402.                      such as ISA, EISA, Micro Channel, or PCI. 
  1403.  
  1404.                 HostBusWidth 
  1405.                      Indicates the maximum width of host bus data transfers the 
  1406.                      adapter supports. Refer to RMBASE.H for values for these 
  1407.                      fields. 
  1408.  
  1409.                 pAdjunctList (PADJUNCT) 
  1410.                      Pointer to a linked list of adjunct data structures. The 
  1411.                      following adjunct structures should be included in the 
  1412.                      list: 
  1413.  
  1414.                      ADJ_ADAPTER_NUMBER     This adjunct contains the 
  1415.                                             zero-based adapter number for the 
  1416.                                             adapter being created. 
  1417.  
  1418.                 Reserved (ULONG) 
  1419.                      Reserved. 
  1420.  
  1421.            hParentDevice (HDEVICE) 
  1422.                 Indicates the handle of the parent adapter or device for the 
  1423.                 adapter being created. This field can be set to NULL, in which 
  1424.                 case the adapter will be assigned to the default system bus. If 
  1425.                 the system contains multiple buses such as ISA or PCI, the 
  1426.                 HostBusType field will be used to choose the appropriate bus. 
  1427.  
  1428.            &ResourceList (PAHRESOURCE) 
  1429.                 Pointer to a structure containing a count and a list of 
  1430.                 resource handles to be assigned to this adapter. 
  1431.  
  1432.  
  1433.                                 AHRESOURCE   struct
  1434.                                              {
  1435.                                                ULONG     NumResource;
  1436.                                                HRESOURCE hResource[1];
  1437.                                              }
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ 5.8.3. Returns ΓòÉΓòÉΓòÉ
  1441.  
  1442. On systems where the Resource Manager driver is not installed, the library 
  1443. interface code will return RMRC_SUCCESS and an adapter handle of -1L. 
  1444.  
  1445.  
  1446. ΓòÉΓòÉΓòÉ 5.8.4. Remarks ΓòÉΓòÉΓòÉ
  1447.  
  1448. As an alternative, resources may be added after the adapter is created by using 
  1449. the RMModifyAdapter service. In this case, the ResourceList pointer should be 
  1450. set to NULL. 
  1451.  
  1452.  
  1453. ΓòÉΓòÉΓòÉ 5.9. RMCreateDevice - Obtain a Device Handle ΓòÉΓòÉΓòÉ
  1454.  
  1455. This service allows a driver to register a device with the Resource Manager and 
  1456. to assign the device to an adapter. A device handle (HDEVICE) is returned by 
  1457. this service to identify the device. 
  1458.  
  1459. When a device is registered, a list of resource handles (representing hardware 
  1460. resources used by this device) can be assigned optionally to the device. 
  1461.  
  1462. Information about the device being registered is passed in a DEVICESTRUCT, 
  1463. which is described below. 
  1464.  
  1465.  
  1466. ΓòÉΓòÉΓòÉ 5.9.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1467.  
  1468.  
  1469.          rc = RMCreateDevice( (HDRIVER)       hDriver,
  1470.                               (PHDEVICE)      &hDevice,
  1471.                               (PDEVICESTRUCT) &DeviceStruct,
  1472.                               (HADAPTER)      hParentAdapter,
  1473.                               (PAHRESOURCE)   pahResource);
  1474.  
  1475.  
  1476. ΓòÉΓòÉΓòÉ 5.9.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1477.  
  1478.            hDriver (HDRIVER) 
  1479.                 Handle of the device driver creating this device. 
  1480.  
  1481.            &hDevice (PHDEVICE) 
  1482.                 Pointer to a variable to receive the returned device handle. 
  1483.  
  1484.            &DeviceStruct 
  1485.                 Pointer to the following structure: 
  1486.  
  1487.                                 DEVICESTRUCT   struct
  1488.                                                {
  1489.                                                  PSZ      DevDescriptName;
  1490.                                                  USHORT   DevFlags;
  1491.                                                  USHORT   DevType;
  1492.                                                  PADJUNCT pAdjunctList;
  1493.                                                };
  1494.  
  1495.                 DevDescriptName (PSZ) 
  1496.                      Pointer to an ASCIIZ string containing the device key and 
  1497.                      a brief description of the device. For example: 
  1498.  
  1499.  
  1500.                                                   "DSKT_#  1.44MB Diskette Drive"
  1501.                                                   "DISK_#   Fixed Disk"
  1502.  
  1503.                      Note:  Up to the first 16 non-blank characters are used as 
  1504.                             a key to locate this device. 
  1505.  
  1506.                      The RMCreateDevice service will substitute the "#" 
  1507.                      character with the device number or SCSI Target/Lun 
  1508.                      supplied in the adjunct list. 
  1509.  
  1510.                      See Device Adapter Keys for additional information 
  1511.                      concerning device and adapter keys. 
  1512.  
  1513.                 DevFlags (USHORT) 
  1514.                      Device attribute flags. Unused flags must be set to zero 
  1515.                      by the caller. The following is a valid flag value: 
  1516.  
  1517.  
  1518.                                                          DS_REMOVEABLE_MEDIA
  1519.  
  1520.                      The device has removable media. 
  1521.  
  1522.                 DevType (USHORT) 
  1523.                      Device type. Valid device types include: 
  1524.  
  1525.                      DS_TYPE_DISK              All direct access devices. 
  1526.                      DS_TYPE_TAPE              Sequential access devices. 
  1527.                      DS_TYPE_PRINTER           Printer device. 
  1528.                      DS_TYPE_PROCESSOR         Processor-type device. 
  1529.                      DS_TYPE_WORM              Write-Once-Read-Many device. 
  1530.                      DS_TYPE_CDROM             CD-ROM device. 
  1531.                      DS_TYPE_SCANNER           Scanner device. 
  1532.                      DS_TYPE_OPT_MEM           Optical disk. 
  1533.                      DS_TYPE_CHANGER           Changer device. 
  1534.                      DS_TYPE_COMM              Communication devices. 
  1535.                      DS_TYPE_ATAPI             ATAPI protocol device. 
  1536.                      DS_TYPE_SCSI_ATT          SCSI bus attachment (bridge 
  1537.                                                controller). 
  1538.                      DS_TYPE_SOCKET            PCMCIA socket. 
  1539.                      DS_TYPE_SLOT              ISA/Micro Channel/EISA/PCI bus 
  1540.                                                slot. 
  1541.                      DS_TYPE_PLANAR_CHIPSET    DMA/IRQ/TIMER controllers. 
  1542.                      DS_TYPE_IO                Input/Output. 
  1543.                      DS_TYPE_AUDIO             Audio device. 
  1544.                      DS_TYPE_UNKNOWN           Unknown device type. 
  1545.  
  1546.                 pAdjunctList (PADJUNCT) 
  1547.                      Pointer to a linked list of adjunct data structures. The 
  1548.                      following adjunct structures should be included in the 
  1549.                      list: 
  1550.  
  1551.                      ADD Drivers      ADJ_ADD_UNIT 
  1552.  
  1553.                                       This adjunct contains the ADD handle and 
  1554.                                       ADD unit number the ADD driver will 
  1555.                                       assign to the device. 
  1556.  
  1557.                      Non-SCSI Devices ADJ_DEVICE_NUMBER 
  1558.  
  1559.                                       This adjunct contains the zero-based 
  1560.                                       device number for non-SCSI devices. For 
  1561.                                       example, the nth CD-ROM is supported by 
  1562.                                       an adapter. 
  1563.  
  1564.                      SCSI Devices     ADJ_SCSI_TARGET_LUN 
  1565.  
  1566.                                       This adjunct contains the SCSI target ID 
  1567.                                       and Logical Device Number (LUN) assigned 
  1568.                                       to the device. 
  1569.  
  1570.            hParentAdapter (HADAPTER) 
  1571.                 Handle of the parent adapter for the device being created. 
  1572.  
  1573.            &ResourceList (PAHRESOURCE) 
  1574.                 Pointer to a structure containing a count and a list of 
  1575.                 resource handles to be assigned to this device. 
  1576.  
  1577.  
  1578.                                 AHRESOURCE  struct
  1579.                                             {
  1580.                                               ULONG     NumResource;
  1581.                                               HRESOURCE hResource[1];
  1582.                                             }
  1583.  
  1584.  
  1585. ΓòÉΓòÉΓòÉ 5.9.3. Returns ΓòÉΓòÉΓòÉ
  1586.  
  1587. On systems where the Resource Manager driver is not installed, the library 
  1588. interface code will return RMRC_SUCCESS and an adapter handle of -1L. 
  1589.  
  1590.  
  1591. ΓòÉΓòÉΓòÉ 5.9.4. Remarks ΓòÉΓòÉΓòÉ
  1592.  
  1593. Resources are usually assigned to the adapter (parent) that owns the device. In 
  1594. some cases, resources are used specifically by a particular device rather than 
  1595. shared between multiple devices supported by an adapter. In this case, 
  1596. resources should be assigned to the device, as appropriate. 
  1597.  
  1598.  
  1599. ΓòÉΓòÉΓòÉ 5.10. RMCreateDriver - Obtain a Driver Handle ΓòÉΓòÉΓòÉ
  1600.  
  1601. This service registers basic information about calling the device driver with 
  1602. the Resource Manager. A driver handle (HDRIVER) is returned by this service and 
  1603. is required by other Resource Manager services to identify the requestor. 
  1604.  
  1605. The first call to this service causes the Resource Manager interface code (the 
  1606. part that is linked to your device driver) to initialize. Therefore, this 
  1607. function is the first Resource Manager call a driver usually makes. 
  1608.  
  1609. Information about the driver registering with the Resource Manager is passed in 
  1610. a DRIVERSTRUCT that is described below. 
  1611.  
  1612.  
  1613. ΓòÉΓòÉΓòÉ 5.10.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1614.  
  1615.  
  1616.          rc = RMCreateDriver( (PDRIVERSTRUCT) &DriverStruct,
  1617.                               (PHDRIVER)      &hDriver         );
  1618.  
  1619.  
  1620. ΓòÉΓòÉΓòÉ 5.10.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1621.  
  1622.            &hDriver 
  1623.                 Pointer to a variable to receive the returned driver handle. 
  1624.  
  1625.            &DriverStruct (PDRIVERSTRUCT) 
  1626.                 Pointer to the following structure: 
  1627.  
  1628.                                 DRIVERSTRUCT  struct
  1629.                                               {
  1630.                                                  PSZ       DrvrName;
  1631.                                                  PSZ       DrvrDescript;
  1632.                                                  PSZ       VendorName;
  1633.                                                  UCHAR     MajorVer;
  1634.                                                  UCHAR     MinorVer;
  1635.                                                  DATESTAMP Date;
  1636.                                                  USHORT    DrvrFlags;
  1637.                                                  USHORT    DrvrType;
  1638.                                                  USHORT    DrvrSubType;
  1639.                                                  PFNRMCB   DrvrCallback;
  1640.                                               };
  1641.  
  1642.                 DrvrName (PSZ) 
  1643.                      Pointer to ASCIIZ name of device driver. For example: 
  1644.  
  1645.                                                        "IBM1FLPY.ADD"
  1646.                                                        "C:\MMOS2\MVPRODD.SYS"
  1647.  
  1648.                 DrvrDescript (PSZ) 
  1649.                      Pointer to a brief ASCIIZ description of device driver. 
  1650.                      For example: 
  1651.  
  1652.                                                        "ISA/EISA Diskette ADD Driver"
  1653.  
  1654.                 VendorName (PSZ) 
  1655.                      Pointer to ASCIIZ vendor name For example: 
  1656.  
  1657.                                                         "IBM Corporation"
  1658.  
  1659.                 MajorVer (UCHAR) 
  1660.  
  1661.                 MinorVer (UCHAR) 
  1662.                      The Resource Management interface level is the version of 
  1663.                      the Resource Manager services your driver is using. 
  1664.                      Currently, these fields must be set to CMVERSION_MAJOR and 
  1665.                      CMVERSION_MINOR, which are defined in RMBASE.H. 
  1666.  
  1667.                      Note:  This is not the version or level of your driver. If 
  1668.                             this field does not contain a valid value, the 
  1669.                             RMCreateDriver request will fail. 
  1670.  
  1671.                 Date (DATESTAMP) 
  1672.                      Structure containing the year/month/day to identify the 
  1673.                      version of your driver. 
  1674.  
  1675.  
  1676.                                           DATESTAMP struct
  1677.                                                     {
  1678.                                                       USHORT Year;
  1679.                                                       UCHAR  Month;
  1680.                                                       UCHAR  Day;
  1681.                                                     };
  1682.  
  1683.                      Year (USHORT)  Year as a 16-bit integer. 
  1684.  
  1685.                      Month (UCHAR)  Month as an 8-bit integer. Allowable range 
  1686.                                     (1-12). 
  1687.  
  1688.                      Day (UCHAR)    Day of month as an 8-bit integer. Allowable 
  1689.                                     range (1-31). 
  1690.  
  1691.                      For example: 
  1692.  
  1693.                                                 October 11, 1994
  1694.  
  1695.                                                 pDS->Date.Year  = 1994;
  1696.                                                 pDS->Date.Month = 10;
  1697.                                                 pDS->Date.Day   = 11;
  1698.  
  1699.                 DrvrFlags (USHORT) 
  1700.                      Driver attribute flags. Unused bits must be set to zero by 
  1701.                      the caller. 
  1702.  
  1703.                      Valid flag values (See also DRF_* in RMBASE.H). 
  1704.  
  1705.                      DRF_STATIC     Driver is loaded when the system is 
  1706.                                     restored. 
  1707.  
  1708.                 DrvrType (USHORT) 
  1709.  
  1710.                 DrvrSubType (USHORT) 
  1711.                      These fields identify the type of interface your driver 
  1712.                      supports. The following categories are defined: 
  1713.  
  1714.                      DRT_PCMCIA          A driver that conforms to PCMCIA 
  1715.                                          specifications. 
  1716.  
  1717.                      DRS_SOCKETSERV      A driver that supports the PCMCIA 
  1718.                                          Socket Service interfaces. 
  1719.  
  1720.                      DRS_CARDSERV        A driver that supports the PCMCIA Card 
  1721.                                          Service interfaces. 
  1722.  
  1723.                      DRS_CLIENT          A client driver that solely supports 
  1724.                                          PCMCIA options. 
  1725.  
  1726.                                          Note:  If a driver supports both 
  1727.                                                 PCMCIA and non-PCMCIA options, 
  1728.                                                 then the driver category 
  1729.                                                 reflects the non-PCMCIA usage. 
  1730.  
  1731.                      DRT_ADDDM           A driver that conforms to the Adapter 
  1732.                                          Device Driver (ADD) or Device Manager 
  1733.                                          (DM) interfaces. 
  1734.  
  1735.                      DRS_DM              An ADD or DM driver that acts as a 
  1736.                                          device manager interfacing directly 
  1737.                                          with the OS/2 kernel. For example, 
  1738.                                          OS2DASD.DMD and OS2CDROM.DMD. 
  1739.  
  1740.                      DRS_FILTER          An ADD or DM driver that acts as a 
  1741.                                          filter. 
  1742.  
  1743.                      DRS_ADD             An ADD or DM driver that acts as an 
  1744.                                          adapter device driver. For example, 
  1745.                                          IBM1FLPY.ADD and IBM1S506.ADD. 
  1746.  
  1747.                      DRS_DM_TRANSPORT    A device manager whose primary purpose 
  1748.                                          is to convert another protocol to ADD 
  1749.                                          or DM protocols. For example, 
  1750.                                          OS2ASPI.DMD converts Adaptec ASPI 
  1751.                                          protocols to ADD/DM protocols. 
  1752.  
  1753.                      DRT_OS2             Character or block device drivers that 
  1754.                                          interface directly with the OS/2 
  1755.                                          kernel. 
  1756.  
  1757.                      DRS_CHAR            A driver that creates a character 
  1758.                                          device intended for end-user usage. 
  1759.  
  1760.                      DRS_BLOCK           A driver that creates block devices 
  1761.                                          intended for end-user usage. 
  1762.  
  1763.                      DRS_APP_HELPER      A driver that provides private 
  1764.                                          services intended for a particular 
  1765.                                          application rather than the end user 
  1766.                                          directly. 
  1767.  
  1768.                      DRT_AUDIO           A driver that conforms to the OS/2 
  1769.                                          Multimedia APIs. 
  1770.  
  1771.                      DRT_SERVICE         A driver that provides services to 
  1772.                                          other drivers. For example, 
  1773.                                          RESOURCE.SYS. 
  1774.  
  1775.                 DrvrCallback (PFNRMCB) 
  1776.                      Not implemented in version 1.1 of Resource Manager.  Must 
  1777.                      be NULL. 
  1778.  
  1779.  
  1780. ΓòÉΓòÉΓòÉ 5.10.3. Returns ΓòÉΓòÉΓòÉ
  1781.  
  1782. On systems where the Resource Manager driver is not installed, the library 
  1783. interface code will return RMRC_SUCCESS and a driver handle of -1L. 
  1784.  
  1785.  
  1786. ΓòÉΓòÉΓòÉ 5.11. RMCreateLDev - Obtain a Logical Device Handle Adapter ΓòÉΓòÉΓòÉ
  1787.  
  1788. This service allows a driver to register a logical device with the Resource 
  1789. Manager. A logical device handle (HLDEV) is returned by this service to 
  1790. identify the logical device. 
  1791.  
  1792. Information about the logical device being registered is passed in an 
  1793. LDEVSTRUCT. 
  1794.  
  1795.  
  1796. ΓòÉΓòÉΓòÉ 5.11.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1797.  
  1798.  
  1799.          rc = RMCreateLDev( (HDRIVER)     hDriver,
  1800.                             (PHLDEV)      &hLDev,
  1801.                             (HDEVICE)     hAssocDevice,
  1802.                             (PLDEVSTRICT) &LDevStruct );
  1803.  
  1804.  
  1805. ΓòÉΓòÉΓòÉ 5.11.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1806.  
  1807.            hDriver (HDRIVER) 
  1808.                 Driver handle of the device driver creating this adapter. 
  1809.  
  1810.            &hLDev (PHLDEV) 
  1811.                 Pointer to variable to receive the returned logical device 
  1812.                 handle. 
  1813.  
  1814.            hAssocDevice (HDEVICE) 
  1815.                 Handle of the physical device or adapter that this logical 
  1816.                 device is aliasing. 
  1817.  
  1818.                 Note:  This field can also contain an adapter handle that was 
  1819.                        coerced to an HDEVICE type. 
  1820.  
  1821.            &LDevStruct 
  1822.                 Pointer to the following structure: 
  1823.  
  1824.                                 LDEVSTRUCT struct
  1825.                                            {
  1826.                                              PSZ      LDevDescriptName;
  1827.                                              USHORT   LDevFlags;
  1828.                                              USHORT   LDevClass;
  1829.                                              HDEVICE  LDevHDevice;
  1830.                                              PADJUNCT pAdjunctList;
  1831.                                            };
  1832.  
  1833.                 LDevDescriptName (PSZ) 
  1834.                      Pointer to an ASCIIZ string containing the logical device 
  1835.                      key and a brief description of the device. For example: 
  1836.  
  1837.                                           "FIXDSK_#  Fixed Disk Drive"
  1838.                                           "COMM_#    Serial Port"
  1839.  
  1840.                      Up to the first 16 non-blank characters are used as a key 
  1841.                      to locate this device. The RMCreateLDev services will 
  1842.                      substitute the "#" character for the device number 
  1843.                      supplied in the adjunct list. 
  1844.  
  1845.                      Refer to Device Adapter Keys for additional information 
  1846.                      concerning device or adapter keys. 
  1847.  
  1848.                 LDevFlags (USHORT) 
  1849.                      Currently, there are no flags defined. This field must be 
  1850.                      initialized to zero by the caller. 
  1851.  
  1852.                 LDevClass (USHORT) 
  1853.                      Specifies the type of logical device being created. The 
  1854.                      logical device returned will be made a child of the 
  1855.                      Resource Manager node for the class of device specified. 
  1856.  
  1857.                                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1858.                                 ΓöéLogical Device Type           ΓöéClass Node Name               Γöé
  1859.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1860.                                 ΓöéLDEV_CLASS_DASD               ΓöéDASD                          Γöé
  1861.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1862.                                 ΓöéLDEV_CLASS_CDROM              ΓöéCDROM                         Γöé
  1863.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1864.                                 ΓöéLDEV_CLASS_SERIAL             ΓöéSERIAL                        Γöé
  1865.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1866.                                 ΓöéLDEV_CLASS_PARALLEL           ΓöéPARALLEL                      Γöé
  1867.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1868.                                 ΓöéLDEV_CLASS_TAPE               ΓöéTAPE                          Γöé
  1869.                                 ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1870.  
  1871.                 Refer to Logical View Management for further information. 
  1872.  
  1873.                 LDevHDevice 
  1874.                      This field must be initialized to zero by the caller. It 
  1875.                      returns the handle of a physical device indicated by 
  1876.                      hAssocDevice when a copy of the logical device node is 
  1877.                      returned by RMGetNodeInfo. 
  1878.  
  1879.                 pAdjunctList (PADJUNCT) 
  1880.                      A pointer to a linked list of adjunct data structures. The 
  1881.                      following adjunct structure should be included in the 
  1882.                      list: 
  1883.  
  1884.                   o  ADJ_DEVICE_NUMBER 
  1885.  
  1886.                      This adjunct contains the zero-based device number for the 
  1887.                      logical device being created. 
  1888.  
  1889.  
  1890. ΓòÉΓòÉΓòÉ 5.11.3. Returns ΓòÉΓòÉΓòÉ
  1891.  
  1892. On systems where the Resource Manager driver is not installed, the library 
  1893. interface code will return RMRC_SUCCESS and a logical device handle of -1L. 
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ 5.12. RMCreateSysName - Obtain a System Name Handle ΓòÉΓòÉΓòÉ
  1897.  
  1898. This service allows a driver to register a system name with the Resource 
  1899. Manager and associate it with a logical device. A system-name handle (HSYSNAME) 
  1900. is returned by this service to identify the system name. 
  1901.  
  1902. Information about the system name being registered is passed in a 
  1903. SYSNAMESTRUCT. 
  1904.  
  1905.  
  1906. ΓòÉΓòÉΓòÉ 5.12.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1907.  
  1908.  
  1909.          rc = RMCreateSysName( (HDRIVER)        hDriver,
  1910.                                (PHSYSNAME)      &hSysName,
  1911.                                (HLDEV)          hLDevParent,
  1912.                                (PSYSNAMESTRUCT) &SysNameStruct );
  1913.  
  1914.  
  1915. ΓòÉΓòÉΓòÉ 5.12.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1916.  
  1917.            hDriver (HDRIVER) 
  1918.                 Driver handle of the device driver creating this adapter. 
  1919.  
  1920.            &hSysName (PSYSNAME) 
  1921.                 Pointer to variable to receive the returned system-name handle. 
  1922.  
  1923.            hLDevParent (HLDEV) 
  1924.                 Handle of the logical device with which the system name is 
  1925.                 associated, such as the parent of the system name. 
  1926.  
  1927.            &SysNameStruct 
  1928.                 Pointer to the following structure: 
  1929.  
  1930.  
  1931.                                 SYSNAMESTRUCT struct
  1932.                                               {
  1933.                                                 PSZ      SysDescriptName;
  1934.                                                 PADJUNCT pAdjunctList;
  1935.                                                 USHORT   SysFlags;
  1936.                                                 USHORT   Reserved;
  1937.                                              };
  1938.  
  1939.                 SysDescriptName (PSZ) 
  1940.                      Pointer to an ASCIIZ string containing the system name key 
  1941.                      and a brief description of the system name. For example: 
  1942.  
  1943.                                           "C:    Logical DASD Volume"
  1944.                                           "COM1: Communications Port"
  1945.  
  1946.                 pAdjunctList 
  1947.                      Pointer to a linked list of adjunct data structures. 
  1948.  
  1949.                      The following adjunct structure should be included in the 
  1950.                      list: 
  1951.  
  1952.                   o  ADJ_DASD_VOL 
  1953.  
  1954.                      This adjunct is used for DASD-type devices to indicate the 
  1955.                      capacity and file-system type for the drive letter 
  1956.                      indicated by the system name. 
  1957.  
  1958.  
  1959. ΓòÉΓòÉΓòÉ 5.12.3. Returns ΓòÉΓòÉΓòÉ
  1960.  
  1961. On systems where the Resource Manager driver is not installed, the library 
  1962. interface code will return RMRC_SUCCESS and a system name handle of -1L. 
  1963.  
  1964.  
  1965. ΓòÉΓòÉΓòÉ 5.13. RMDeAllocResource - Destroy a Resource Handle ΓòÉΓòÉΓòÉ
  1966.  
  1967. This service destroys a resource handle created by RMAllocResource. 
  1968.  
  1969.  
  1970. ΓòÉΓòÉΓòÉ 5.13.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1971.  
  1972.  
  1973.          rc = RMDeallocResource ( (HDRIVER)  hDriver
  1974.                                   (HRESOURCE) hResource );
  1975.  
  1976.  
  1977. ΓòÉΓòÉΓòÉ 5.13.2. Calling Parameters ΓòÉΓòÉΓòÉ
  1978.  
  1979.            hDriver 
  1980.                 Handle of the driver when supplied the resource was created. 
  1981.  
  1982.            hResource 
  1983.                 Handle of the resource to be destroyed. 
  1984.  
  1985.  
  1986. ΓòÉΓòÉΓòÉ 5.13.3. Returns ΓòÉΓòÉΓòÉ
  1987.  
  1988. On systems where the Resource Manager driver is not installed, the library 
  1989. interface code will return RMRC_SUCCESS. 
  1990.  
  1991.  
  1992. ΓòÉΓòÉΓòÉ 5.14. RMDestroyAdapterHandle - Destroy an Adapter Handle ΓòÉΓòÉΓòÉ
  1993.  
  1994. This service releases an adapter handle created by RMCreateAdapter. 
  1995.  
  1996.  
  1997. ΓòÉΓòÉΓòÉ 5.14.1. Calling Sequence ΓòÉΓòÉΓòÉ
  1998.  
  1999.  
  2000.          rc = RMDestroyAdapter( (HDRIVER)  hDriver
  2001.  
  2002.  
  2003. ΓòÉΓòÉΓòÉ 5.14.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2004.  
  2005.            hDriver 
  2006.                 Handle of the driver supplied when the adapter is created. 
  2007.  
  2008.            hAdapter 
  2009.                 Handle of the adapter to be destroyed. 
  2010.  
  2011.  
  2012. ΓòÉΓòÉΓòÉ 5.14.3. Returns ΓòÉΓòÉΓòÉ
  2013.  
  2014. On systems where the Resource Manager driver is not installed, the library 
  2015. interface code will return RMRC_SUCCESS. 
  2016.  
  2017.  
  2018. ΓòÉΓòÉΓòÉ 5.14.4. Remarks ΓòÉΓòÉΓòÉ
  2019.  
  2020. Although normal driver execution results in adapter-node creation, there are 
  2021. also environments where adapter node destruction is needed. PCMCIA and docking 
  2022. stations are two environments where the adapter-node destruction service is 
  2023. useful. 
  2024.  
  2025. Destroying an adapter also destroys any child devices associated with the 
  2026. adapter. Any resource handles allocated to the adapter or child devices are 
  2027. released, as well. 
  2028.  
  2029.  
  2030. ΓòÉΓòÉΓòÉ 5.15. RMDestroyDevice - Destroy a Device Handle ΓòÉΓòÉΓòÉ
  2031.  
  2032. This service releases a device handle created by RMCreateDevice. Any resources 
  2033. assigned to the device are released and the device is destroyed. 
  2034.  
  2035.  
  2036. ΓòÉΓòÉΓòÉ 5.15.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2037.  
  2038.  
  2039.          rc = RMDestroyDevice( (HDRIVER) hDriver
  2040.                                (HDEVICE) hDevice );
  2041.  
  2042.  
  2043. ΓòÉΓòÉΓòÉ 5.15.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2044.  
  2045.            hDriver 
  2046.                 Handle of the driver supplied when device was created. 
  2047.  
  2048.            hDevice 
  2049.                 Handle of the the device to be destroyed. 
  2050.  
  2051.  
  2052. ΓòÉΓòÉΓòÉ 5.15.3. Returns ΓòÉΓòÉΓòÉ
  2053.  
  2054. On systems where the Resource Manager driver is not installed, the library 
  2055. interface code will return RMRC_SUCCESS. 
  2056.  
  2057.  
  2058. ΓòÉΓòÉΓòÉ 5.16. RMDestroyDriver - Destroy a Driver Handle ΓòÉΓòÉΓòÉ
  2059.  
  2060. This service releases a driver handle created by RMCreateDriver. If a driver 
  2061. determines it should fail its initialization (such as unload), the driver will 
  2062. issue this call if it had previously issued an RMCreateDriver request. 
  2063.  
  2064. Issuing this call will delete all devices, adapters, and resource records 
  2065. created under this driver handle. 
  2066.  
  2067.  
  2068. ΓòÉΓòÉΓòÉ 5.16.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2069.  
  2070.  
  2071.          rc = RMDestroyDriver( (HDRIVER) hDriver );
  2072.  
  2073.  
  2074. ΓòÉΓòÉΓòÉ 5.16.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2075.  
  2076.            hDriver 
  2077.                 Handle of the driver to be destroyed. 
  2078.  
  2079.  
  2080. ΓòÉΓòÉΓòÉ 5.16.3. Returns ΓòÉΓòÉΓòÉ
  2081.  
  2082. On systems where the Resource Manager driver is not installed, the library 
  2083. interface code will return RMRC_SUCCESS. 
  2084.  
  2085.  
  2086. ΓòÉΓòÉΓòÉ 5.16.4. Remarks ΓòÉΓòÉΓòÉ
  2087.  
  2088. Drivers that intend to unload must still issue the appropriate DevHelp calls to 
  2089. release IRQs and other kernel resources. 
  2090.  
  2091.  
  2092. ΓòÉΓòÉΓòÉ 5.17. RMDestroyLDev - Destroy a Logical Device Handle ΓòÉΓòÉΓòÉ
  2093.  
  2094. This service destroys a logical device handle created by RMCreateLDev. 
  2095. Destroying a logical device also destroys any system names associated with the 
  2096. logical device. 
  2097.  
  2098.  
  2099. ΓòÉΓòÉΓòÉ 5.17.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2100.  
  2101.  
  2102.          rc = RMDestroyLDev( (HDRIVER)  hDriver,
  2103.                              (HLDEV)    hLDev    );
  2104.  
  2105.  
  2106. ΓòÉΓòÉΓòÉ 5.17.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2107.  
  2108.            hDriver (HDRIVER) 
  2109.                 Driver handle of the device driver that created the logical 
  2110.                 device. 
  2111.  
  2112.            hLDev (HLDEV) 
  2113.                 Handle of the logical device to be destroyed. 
  2114.  
  2115.  
  2116. ΓòÉΓòÉΓòÉ 5.17.3. Returns ΓòÉΓòÉΓòÉ
  2117.  
  2118. On systems where the Resource Manager driver is not installed, the library 
  2119. interface code will return RMRC_SUCCESS. 
  2120.  
  2121.  
  2122. ΓòÉΓòÉΓòÉ 5.18. RMDestroySysName - Destroy a System Name Handle ΓòÉΓòÉΓòÉ
  2123.  
  2124. This service destroys a system name handle that was created by RMCreateSysName. 
  2125.  
  2126.  
  2127. ΓòÉΓòÉΓòÉ 5.18.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2128.  
  2129.  
  2130.          rc = RMDestroySysName( (HDRIVER)  hDriver,
  2131.                                 (HSYSNAME) hSysName    );
  2132.  
  2133.  
  2134. ΓòÉΓòÉΓòÉ 5.18.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2135.  
  2136.            hDriver (HDRIVER) 
  2137.                 Driver handle of the device driver that created the logical 
  2138.                 device. 
  2139.  
  2140.            hSysName (HSYSNAME) 
  2141.                 Handle of the system name to be destroyed. 
  2142.  
  2143.  
  2144. ΓòÉΓòÉΓòÉ 5.18.3. Returns ΓòÉΓòÉΓòÉ
  2145.  
  2146. On systems where the Resource Manager driver is not installed, the library 
  2147. interface code will return RMRC_SUCCESS. 
  2148.  
  2149.  
  2150. ΓòÉΓòÉΓòÉ 5.19. RMGetNodeInfo - Return Resource Manager Node Information ΓòÉΓòÉΓòÉ
  2151.  
  2152. This service returns the information content of the Resource Manager handle 
  2153. indicated. 
  2154.  
  2155.  
  2156. ΓòÉΓòÉΓòÉ 5.19.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2157.  
  2158.  
  2159.     rc = RMGetNodeInfo( (RMHANDLE)         hRMHandle,
  2160.                         (PRM_GETNODE_DATA) &NodeInfo,
  2161.                         (USHORT)           NodeInfoSize );
  2162.  
  2163.  
  2164. ΓòÉΓòÉΓòÉ 5.19.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2165.  
  2166.            &hRMHandle (RMHANDLE) 
  2167.                 Resource Manager handle whose information is to be returned. 
  2168.                 The following handle types are allowed: 
  2169.  
  2170.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2171.             ΓöéHandleType                    ΓöéDescription                   Γöé
  2172.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2173.             ΓöéHANDLE_TYPE_DRIVER            ΓöéDriver Handle                 Γöé
  2174.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2175.             ΓöéHANDLE_TYPE_ADAPTER           ΓöéAdapter Handle                Γöé
  2176.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2177.             ΓöéHANDLE_TYPE_DEVICE            ΓöéDevice Handle                 Γöé
  2178.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2179.             ΓöéHANDLE_TYPE_LOGDEV            ΓöéLogical Device Handle         Γöé
  2180.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2181.             ΓöéHANDLE_TYPE_SYSDEV            ΓöéSystem Name Handle            Γöé
  2182.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2183.  
  2184.            &NodeInfo (PRM_GETNODE_DATA) 
  2185.                 Pointer to a buffer that will contain the Resource Manager node 
  2186.                 information. 
  2187.  
  2188.  
  2189.                                 RM_GETNODE_DATA struct
  2190.                                                 {
  2191.                                                   ULONG          RMNodeSize;
  2192.                                                   RM_NODE        RMNode;
  2193.                                                 };
  2194.  
  2195.                 RMNodeSize (ULONG) 
  2196.                      Total data length, returned in bytes. If the buffer 
  2197.                      provided is too small to contain the Resource Manager node 
  2198.                      information, this field will contain the required buffer 
  2199.                      length. 
  2200.  
  2201.                 RMNode (RM_NODE) 
  2202.                      A structure containing information about the requested 
  2203.                      Resource Manager node. 
  2204.  
  2205.  
  2206.                                           RM_NODE struct
  2207.                                                   {
  2208.                                                     ULONG             VersionInfo;
  2209.                                                     ULONG             NodeType;
  2210.                                                     RMHANDLE          DriverHandle;
  2211.  
  2212.                                                     union
  2213.                                                     {
  2214.                                                       PADAPTERSTRUCT  pAdapterNode;
  2215.                                                       PDEVICESTRUCT   pDeviceNode;
  2216.                                                       PLDEVSTRUCT     pLDevNode;
  2217.                                                       PSYSNAMESTRUCT  pSysNameNode;
  2218.                                                       PDRIVERSTRUCT   pDriver;
  2219.                                                     };
  2220.                                                     PRESOURCELIST     pResourceList;
  2221.                                                   }
  2222.  
  2223.                      VersionInfo (ULONG) 
  2224.                           Version of the Resource Management driver. 
  2225.  
  2226.                      NodeType (ULONG) 
  2227.                           The type of node to which the handle provided refers. 
  2228.  
  2229.                      pAdapterNode (PADAPTERSTRUCT) 
  2230.                           This field contains a pointer to a structure that 
  2231.                           describes the Resource Manager node. This structure 
  2232.                           is a copy of the structure that was provided when the 
  2233.                           node was created. 
  2234.  
  2235.                           The pointer type selected from the union should be 
  2236.                           based on the NodeType value returned. 
  2237.  
  2238.                                 ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2239.                                 ΓöéNodeType            ΓöéStructure Pointer   ΓöéService             Γöé
  2240.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2241.                                 ΓöéRMTYPE_ADAPTER      ΓöépAdapterNode        ΓöéRMCreateAdapter     Γöé
  2242.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2243.                                 ΓöéRMTYPE_DEVICE       ΓöépDeviceNode         ΓöéRMCreateDevice      Γöé
  2244.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2245.                                 ΓöéRMTYPE_LDEV         ΓöépLDevNode           ΓöéRMCreateLDev        Γöé
  2246.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2247.                                 ΓöéRMTYPE_SYSNAME      ΓöépSysNameNode        ΓöéRMCreateSysName     Γöé
  2248.                                 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2249.                                 ΓöéRMTYPE_DRIVER       ΓöépDriver             ΓöéRMCreateDriver      Γöé
  2250.                                 ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2251.  
  2252.                 pResourceList (PRESOURCELIST) 
  2253.                      Pointer to a structure containing a count and list of 
  2254.                      resources assigned to this node. 
  2255.  
  2256.  
  2257.                                           PRESOURCELIST struct
  2258.                                                         {
  2259.                                                           ULONG          Count;
  2260.                                                           RESOURCESTRUCT Resource[1];
  2261.                                                         }
  2262.  
  2263.                 Count (ULONG) 
  2264.                      Count of resource structures returned. 
  2265.  
  2266.                 Resource [ ] (RESOURCESTRUCT) 
  2267.                      Array of resource structures assigned to this node. Refer 
  2268.                      to RMAllocResource - Obtain a Resource Handle for a 
  2269.                      description of the RESOURCESTRUCT datatype. 
  2270.  
  2271.            NodeInfoSize (USHORT) 
  2272.                 Size of buffer pointed to by &NodeInfo. 
  2273.  
  2274.  
  2275. ΓòÉΓòÉΓòÉ 5.19.3. Returns ΓòÉΓòÉΓòÉ
  2276.  
  2277. On systems where the Resource Manager driver is not installed, the library 
  2278. interface code will return RMRC_NOT_INSTALLED. 
  2279.  
  2280.  
  2281. ΓòÉΓòÉΓòÉ 5.20. RMHandleToParent - Return a Parent Handle ΓòÉΓòÉΓòÉ
  2282.  
  2283. This service returns the parent handle of the handle provided. 
  2284.  
  2285.  
  2286. ΓòÉΓòÉΓòÉ 5.20.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2287.  
  2288.  
  2289.          rc = RMHandleToParent( (RMHANDLE)    hHandle,
  2290.                                 (PRMHANDLE)   &hParent );
  2291.  
  2292.  
  2293. ΓòÉΓòÉΓòÉ 5.20.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2294.  
  2295.            hHandle (RMHANDLE) 
  2296.                 Handle whose parent is to be determined. Valid handle types for 
  2297.                 this service include: 
  2298.  
  2299.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2300.             ΓöéHandleType                    ΓöéDescription                   Γöé
  2301.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2302.             ΓöéHANDLE_TYPE_ADAPTER           ΓöéAdapter Handle                Γöé
  2303.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2304.             ΓöéHANDLE_TYPE_DEVICE            ΓöéDevice Handle                 Γöé
  2305.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2306.             ΓöéHANDLE_TYPE_RESOURCE          ΓöéResource Handle               Γöé
  2307.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2308.             ΓöéHANDLE_TYPE_LOGDEV            ΓöéLogical Device Handle         Γöé
  2309.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2310.             ΓöéHANDLE_TYPE_SYSDEV            ΓöéSystem Name Handle            Γöé
  2311.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2312.  
  2313.       The parent of a resource handle is considered to be the owner of the 
  2314.       resource. 
  2315.  
  2316.            &hParent (PRMHANDLE)     Handle of the parent of the specified 
  2317.                                     handle. 
  2318.  
  2319.  
  2320. ΓòÉΓòÉΓòÉ 5.20.3. Returns ΓòÉΓòÉΓòÉ
  2321.  
  2322. On systems where the Resource Manager driver is not installed, the library 
  2323. interface code will return RMRC_NOT_INSTALLED. 
  2324.  
  2325.  
  2326. ΓòÉΓòÉΓòÉ 5.21. RMHandleToType - Return the Type of Resource Manager Handle ΓòÉΓòÉΓòÉ
  2327.  
  2328. Returns the type of Resource Manager handle supplied. 
  2329.  
  2330.  
  2331. ΓòÉΓòÉΓòÉ 5.21.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2332.  
  2333.  
  2334.          rc = RMHandleToType( (RMHANDLE)    hHandle,
  2335.                               (PUSHORT)     &HandleType )
  2336.  
  2337.  
  2338. ΓòÉΓòÉΓòÉ 5.21.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2339.  
  2340.            hHandle (RMHANDLE) 
  2341.                 Handle whose type is to be determined. 
  2342.  
  2343.            &HandleType (USHORT) 
  2344.                 Pointer to variable to contain the returned handle type. The 
  2345.                 following handle types can be returned: 
  2346.  
  2347.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2348.   ΓöéHandleType          ΓöéDescription         ΓöéService             Γöé
  2349.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2350.   ΓöéHANDLE_TYPE_INVALID ΓöéInvalid Handle      ΓöéNone                Γöé
  2351.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2352.   ΓöéHANDLE_TYPE_DRIVER  ΓöéDriver Handle       ΓöéRMCreateDriver      Γöé
  2353.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2354.   ΓöéHANDLE_TYPE_ADAPTER ΓöéAdapter Handle      ΓöéRMCreateAdapter     Γöé
  2355.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2356.   ΓöéHANDLE_TYPE_DEVICE  ΓöéDevice Handle       ΓöéRMCreateDevice      Γöé
  2357.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2358.   ΓöéHANDLE_TYPE_RESOURCEΓöéResource Handle     ΓöéRMAllocResource     Γöé
  2359.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2360.   ΓöéHANDLE_TYPE_LOGDEV  ΓöéLogical Device      ΓöéRMCreateLDev        Γöé
  2361.   Γöé                    ΓöéHandle              Γöé                    Γöé
  2362.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2363.   ΓöéHANDLE_TYPE_SYSDEV  ΓöéSystem Name Handle  ΓöéRMCreateSysName     Γöé
  2364.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2365.  
  2366.  
  2367. ΓòÉΓòÉΓòÉ 5.21.3. Returns ΓòÉΓòÉΓòÉ
  2368.  
  2369. On systems where the Resource Manager driver is not installed, the library 
  2370. interface code will return RMRC_NOT_INSTALLED. 
  2371.  
  2372.  
  2373. ΓòÉΓòÉΓòÉ 5.22. RMHDevToHLDev - Return Physical Device Associated with Logical Device ΓòÉΓòÉΓòÉ
  2374.  
  2375. This service returns the Logical Device handle (HLDEV) that is associated with 
  2376. the physical device handle indicated. 
  2377.  
  2378.  
  2379. ΓòÉΓòÉΓòÉ 5.22.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2380.  
  2381.  
  2382.          rc = RMHDevToHLDev ( (HDEVICE)    hDevice,
  2383.                               (HLDEV)      hStartLDev
  2384.                               (PHLDEV)     &hLDev       );
  2385.  
  2386.  
  2387. ΓòÉΓòÉΓòÉ 5.22.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2388.  
  2389.            hDevice 
  2390.                 Resource Manager handle to the physical device. The logical 
  2391.                 device handle that is associated with this physical device 
  2392.                 handle will be returned. 
  2393.  
  2394.            &hStartLDev (HLDEV) 
  2395.                 Handle of the logical device at which to start the search. If 
  2396.                 all logical nodes are to be searched, then HANDLE_LDEV_ROOT 
  2397.                 should be specified. 
  2398.  
  2399.            &hLDev (PHLDEV) 
  2400.                 Pointer to the variable to receive the logical device handle 
  2401.                 (HLDEV) associated with the physical device specified. 
  2402.  
  2403.  
  2404. ΓòÉΓòÉΓòÉ 5.22.3. Returns ΓòÉΓòÉΓòÉ
  2405.  
  2406. On systems where the Resource Manager driver is not installed, the library 
  2407. interface code will return RMRC_NOT_INSTALLED. 
  2408.  
  2409.  
  2410. ΓòÉΓòÉΓòÉ 5.23. RMKeyToHandleList - Search for the Specified Adapter/Device/LDev Key ΓòÉΓòÉΓòÉ
  2411.  
  2412. This service searches for Resource Manager nodes that match the key specified. 
  2413. A list of node handles found is returned in the HandleList structure provided 
  2414. by the caller. 
  2415.  
  2416.  
  2417. ΓòÉΓòÉΓòÉ 5.23.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2418.  
  2419.  
  2420.          rc = RMKeyToHandleList( (RMHANDLE)    hStartNode,
  2421.                                  (PSZ)         SearchKey,
  2422.                                  (PHANDLELIST) &HandleList );
  2423.  
  2424.  
  2425. ΓòÉΓòÉΓòÉ 5.23.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2426.  
  2427.            hStartNode (RMHANDLE) 
  2428.                 The handle of the Resource Manager node at which to start the 
  2429.                 search. This node and all its descendents will be checked. The 
  2430.                 handle provided may be an adapter handle (HADAPTER) or logical 
  2431.                 device handle (HLDEV). 
  2432.  
  2433.       The following "pseudohandles" may also be used as a starting point for a 
  2434.       search: 
  2435.  
  2436.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2437.             ΓöéPseudohandle                  ΓöéNodes Searched                Γöé
  2438.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2439.             ΓöéHANDLE_PHYS_TREE              ΓöéPhysical Device Nodes         Γöé
  2440.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2441.             ΓöéHANDLE_SYS_TREE               ΓöéLogical Device Nodes          Γöé
  2442.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2443.             ΓöéHANDLE_DEFAULT_SYSBUS         ΓöéSystem Bus Nodes              Γöé
  2444.             Γöé                              Γöé(ISA/EISA/Micro Channel)      Γöé
  2445.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2446.             ΓöéHANDLE_X_BUS                  ΓöéPlanar Bus Nodes              Γöé
  2447.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2448.             ΓöéHANDLE_PCI_BUS                ΓöéPCI Bus Nodes                 Γöé
  2449.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2450.  
  2451.            SearchKey (PSZ) 
  2452.                 Pointer to an ASCIIZ string containing the key to be located. 
  2453.                 If the key supplied ends in an asterisk (*), then all keys that 
  2454.                 match the characters up to the asterisk will be returned. Key 
  2455.                 searches are treated as case-insensitive. For example, 
  2456.                 "FIXDSK_*" will return all fixed-disk logical device handles. 
  2457.  
  2458.                 This service does not currently support full (regular pattern 
  2459.                 matching), for example,  only the asterisk is supported. 
  2460.  
  2461.                 Adapter key values are chosen at the discretion of the 
  2462.                 device-driver supplier and are subject to change. 
  2463.  
  2464.            &HandleList (PHANDLELIST) 
  2465.                 Pointer to the following structure: 
  2466.  
  2467.  
  2468.                                 HANDLELIST struct
  2469.                                            {
  2470.                                              USHORT        cMaxHandles;
  2471.                                              USHORT        cHandles;
  2472.                                              HADAPTER      Handles[1];
  2473.                                            };
  2474.  
  2475.                 cMaxHandles (USHORT) 
  2476.                      Number of handles that can be accepted in the handles 
  2477.                      array. This field must be set by the caller. 
  2478.  
  2479.                      The default HANDLELIST type provides room for one handle. 
  2480.                      In this case, cMaxHandles must be set to 1. In the 
  2481.                      following example, 10 handles are expected: 
  2482.  
  2483.                                       #define MAX_HANDLE_COUNT 10
  2484.  
  2485.                                       #define HLISTSIZE(c) ( sizeof(HANDLELIST) +  \
  2486.                                                            (c-1) * sizeof(HADAPTER) )
  2487.  
  2488.                                       UCHAR HandleList[HLISTSIZE(MAX_HANDLE_COUNT)];
  2489.  
  2490.                                       PHANDLELIST pHndList = (PHANDLELIST) HandleList;
  2491.  
  2492.                                       pHndList->cMaxHandles = MAX_HANDLE_COUNT;
  2493.  
  2494.                 cHandles (USHORT)        Actual handle count found. This field 
  2495.                                          must be initially set to zero by the 
  2496.                                          caller. The number of handles reported 
  2497.                                          by this field can exceed cMaxHandles. 
  2498.                                          If the field exceeds cMaxHandles, the 
  2499.                                          HandleList structure supplied was too 
  2500.                                          small. The count will be set to the 
  2501.                                          number of handles actually found. 
  2502.  
  2503.                 Handles[] (HADAPTER)     Array containing the Resource Manager 
  2504.                                          handles that match the specified key. 
  2505.  
  2506.  
  2507. ΓòÉΓòÉΓòÉ 5.23.3. Returns ΓòÉΓòÉΓòÉ
  2508.  
  2509. On systems where the Resource Manager driver is not installed, the library 
  2510. interface code will return RMRC_NOT_INSTALLED. 
  2511.  
  2512.  
  2513. ΓòÉΓòÉΓòÉ 5.24. RMModifyResources - Modify Adapter or Device Resource Sets ΓòÉΓòÉΓòÉ
  2514.  
  2515. This service allows for modification of resources owned by an existing adapter 
  2516. or device. Resource handles can be deleted or added to an adapter or device. 
  2517.  
  2518.  
  2519. ΓòÉΓòÉΓòÉ 5.24.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2520.  
  2521.  
  2522.          rc = RMModifyResources( (HDRIVER)   hDriver,
  2523.                                  (HADAPTER)  hAdapter,
  2524.                                  (USHORT)    ModifyAction,
  2525.                                  (HRESOURCE) hResource);
  2526.  
  2527.  
  2528. ΓòÉΓòÉΓòÉ 5.24.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2529.  
  2530.            hDriver (HDRIVER) 
  2531.                 Driver handle of the device driver that created the adapter or 
  2532.                 device. 
  2533.  
  2534.            &hAdapter (HADAPTER) 
  2535.                 Handle of the adapter or device whose resource set is to be 
  2536.                 modified. 
  2537.  
  2538.            ModifyAction (USHORT) 
  2539.  
  2540.                 RM_MODIFY_ADD            Add the resource handle indicated to 
  2541.                                          the adapter or device. 
  2542.  
  2543.                 RM_MODIFY_DELETE         Delete the resource handle indicated. 
  2544.  
  2545.                                          Deleting a resource implicitly causes 
  2546.                                          an RMDeallocResource to occur; for 
  2547.                                          example, the resource handle is no 
  2548.                                          longer valid. 
  2549.  
  2550.            hResource (HRESOURCE) 
  2551.                 Handle of the resource to be added or deleted. 
  2552.  
  2553.  
  2554. ΓòÉΓòÉΓòÉ 5.24.3. Returns ΓòÉΓòÉΓòÉ
  2555.  
  2556. On systems where the Resource Manager driver is not installed, the library 
  2557. interface code will return RMRC_NOT_INSTALLED. 
  2558.  
  2559.  
  2560. ΓòÉΓòÉΓòÉ 5.25. RMParseSCSIInquiry - Build SCSI Device Description ΓòÉΓòÉΓòÉ
  2561.  
  2562. This service is provided as a convenience for device drivers dealing with SCSI 
  2563. devices. It converts SCSI inquiry data for a device into a device key and a 
  2564. description that can be used in RMCreateDevice. 
  2565.  
  2566.  
  2567. ΓòÉΓòÉΓòÉ 5.25.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2568.  
  2569.  
  2570.          rc = RMParseScsiInquiry( (PVOID)   &InquiryData,
  2571.                                   (PSZ)     DescBuffer,
  2572.                                   (USHORT)  DescBufferSize  );
  2573.  
  2574.  
  2575. ΓòÉΓòÉΓòÉ 5.25.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2576.  
  2577.            &InquiryData (PVOID) 
  2578.                 Pointer to a buffer containing SCSI inquiry data for the 
  2579.                 device. 
  2580.  
  2581.            DescBuffer (PSZ) 
  2582.                 Pointer to a buffer that will receive the device key and device 
  2583.                 description built by this service. This data may be used as the 
  2584.                 device description field (DevDescriptName) of the DEVICESTRUCT 
  2585.                 used to create the device. 
  2586.  
  2587.                 Refer to RMCreateDevice - Obtain a Device Handle for further 
  2588.                 information. 
  2589.  
  2590.            DescBufferSize (USHORT) 
  2591.                 Size of the DescBuffer, in bytes. 
  2592.  
  2593.  
  2594. ΓòÉΓòÉΓòÉ 5.25.3. Returns ΓòÉΓòÉΓòÉ
  2595.  
  2596. On systems where the Resource Manager driver is not installed, the library 
  2597. interface code will return RMRC_NOT_INSTALLED. 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ 5.26. RMResToHandleList - Return List of Adapter/Device Handles That Own a Resource ΓòÉΓòÉΓòÉ
  2601.  
  2602. This service returns a list of Adapter/Device handles that own the resource 
  2603. indicated. 
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ 5.26.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2607.  
  2608.  
  2609.          rc = RMResToHandleList( (PRESOURCESTRUCT) &ResStruct,
  2610.                                  (PHANDLELIST)     &HandleList );
  2611.  
  2612.  
  2613. ΓòÉΓòÉΓòÉ 5.26.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2614.  
  2615.            &ResStruct (PRESOURCESTRUCT) 
  2616.                 Pointer to a RESOURCESTRUCT whose owners are to be located. 
  2617.                 Refer to RMAllocResource - Obtain a Resource Handle for a 
  2618.                 description of the RESOURCESTRUCT datatype. 
  2619.  
  2620.            &HandleList (PHANDLELIST) 
  2621.                 Structure containing a list of adapter or device handles that 
  2622.                 include the specified resource. Refer to RMKeyToHandleList - 
  2623.                 Search for the Specified Adapter/Device/LDev Key for a 
  2624.                 description of the HANDLELIST datatype. 
  2625.  
  2626.  
  2627. ΓòÉΓòÉΓòÉ 5.26.3. Returns ΓòÉΓòÉΓòÉ
  2628.  
  2629. On systems where the Resource Manager driver is not installed, the library 
  2630. interface code will return RMRC_NOT_INSTALLED. 
  2631.  
  2632.  
  2633. ΓòÉΓòÉΓòÉ 5.27. RMUpdateAdjunct - Update Adjunct Data Structure ΓòÉΓòÉΓòÉ
  2634.  
  2635. This service updates an existing adjunct structure. 
  2636.  
  2637.  
  2638. ΓòÉΓòÉΓòÉ 5.27.1. Calling Sequence ΓòÉΓòÉΓòÉ
  2639.  
  2640.  
  2641.          rc = RMUpdateAdjunct( (HDRIVER)  hDriver,
  2642.                                (HDEVICE)  hDevice,
  2643.                                (USHORT)   AdjunctIndex,
  2644.                                (PADJUNCT) &AdjunctData   );
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ 5.27.2. Calling Parameters ΓòÉΓòÉΓòÉ
  2648.  
  2649.            hDriver (HDRIVER) 
  2650.                 Driver handle of the device driver that created the adjunct 
  2651.                 data. 
  2652.  
  2653.            hDevice (HDEVICE) 
  2654.                 Device handle with which the adjunct data is associated. 
  2655.  
  2656.            AdjunctIndex (USHORT) 
  2657.                 Index to the adjunct structure to be replaced. 
  2658.  
  2659.            &AdjunctData 
  2660.                 Pointer to an adjunct structure containing replacement data for 
  2661.                 the adjunct indicated. 
  2662.  
  2663.  For Resource Manager version 1.1, the size of the replacement adjunct 
  2664.  structure must not exceed the size of the existing adjunct. 
  2665.  
  2666.  
  2667. ΓòÉΓòÉΓòÉ 5.27.3. Returns ΓòÉΓòÉΓòÉ
  2668.  
  2669. On systems where the Resource Manager driver is not installed, the library 
  2670. interface code will return RMRC_NOT_INSTALLED. 
  2671.  
  2672.  
  2673. ΓòÉΓòÉΓòÉ 5.28. Resource Manager IOCtls ΓòÉΓòÉΓòÉ
  2674.  
  2675. RESOURCE.SYS provides two IOCtls that allow a ring-3 application to obtain a 
  2676. "snapshot" of the Resource Management data structures. Obtaining a snapshot of 
  2677. the Resource Management data structures consists of the following two steps: 
  2678.  
  2679.    1. A data structure representing a depth-first traversal of the Resource 
  2680.       Manager node structure is obtained. 
  2681.  
  2682.    2. For each node traversed, the following information is provided: 
  2683.  
  2684.            A Resource Manager handle to access the node. 
  2685.            The depth of the node in the tree structure. 
  2686.  
  2687.    3. A copy of each Resource Manager node can be obtained by supplying the 
  2688.       node handle returned in Step 1. 
  2689.  
  2690.  The two IOCtls for Resource Manager are: 
  2691.  
  2692.    o  Get Resource Manager Node Data - Function 01h 
  2693.  
  2694.    o  Enumerate Resource Manager Nodes - Function 02h 
  2695.  
  2696.  
  2697. ΓòÉΓòÉΓòÉ 5.28.1. Get Resource Manager Node Data - Function 01h ΓòÉΓòÉΓòÉ
  2698.  
  2699.  
  2700. ΓòÉΓòÉΓòÉ <hidden> Description - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2701.  
  2702. This function returns the contents of the Resource Manager node indicated by 
  2703. the handle provided. 
  2704.  
  2705.  
  2706. ΓòÉΓòÉΓòÉ <hidden> RMHandle - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2707.  
  2708.  RMHandle 
  2709.       This field must be initialized to the handle of the Resource Manager node 
  2710.       to be interrogated. 
  2711.  
  2712.  
  2713. ΓòÉΓòÉΓòÉ <hidden> Parameter Packet Format - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2714.  
  2715. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2716. ΓöéField        Length    Γöé
  2717. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2718. ΓöéRMHandle     ULONG     Γöé
  2719. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2720.  
  2721.  
  2722. ΓòÉΓòÉΓòÉ <hidden> RMNodeSize - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2723.  
  2724.  RMNodeSize 
  2725.       Size of the Resource Manager node information returned. 
  2726.  
  2727.  
  2728. ΓòÉΓòÉΓòÉ <hidden> RMNode - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2729.  
  2730.  RMNode 
  2731.       This field is set to a structure describing the Resource Manager node and 
  2732.       its associated resources. 
  2733.  
  2734.  
  2735.             RM_NODE struct
  2736.  
  2737.                 {
  2738.  
  2739.                   ULONG             VersionInfo;
  2740.                   ULONG             NodeType;
  2741.                   RMHANDLE          DriverHandle;
  2742.  
  2743.                   union
  2744.                   {
  2745.                     PADAPTERSTRUCT  pAdapterNode;
  2746.                     PDEVICESTRUCT   pDeviceNode;
  2747.                     PLDEVSTRUCT     pLDevNode;
  2748.                     PSYSNAMESTRUCT  pSysNameNode;
  2749.                     PDRIVERSTRUCT   pDriver;
  2750.                   };
  2751.                   PRESOURCELIST     pResourceList;
  2752.                 }
  2753.  
  2754.       VersionInfo (ULONG) 
  2755.            Version of the Resource Management driver. 
  2756.  
  2757.       NodeType (ULONG) 
  2758.            The type of node to which the handle provided refers. 
  2759.  
  2760.       pAdapterNode (PADAPTERSTRUCT) 
  2761.            This field contains a pointer to a structure that describes the 
  2762.            Resource Manager node. This structure is a copy of the structure 
  2763.            that was provided when the node was created. The pointer type 
  2764.            selected from the union should be based on the NodeType value 
  2765.            returned. 
  2766.  
  2767.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2768.             ΓöéNodeType            ΓöéStructure Pointer   ΓöéService             Γöé
  2769.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2770.             ΓöéRMTYPE_ADAPTER      ΓöépAdapterNode        ΓöéRMCreateAdapter     Γöé
  2771.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2772.             ΓöéRMTYPE_DEVICE       ΓöépDeviceNode         ΓöéRMCreateDevice      Γöé
  2773.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2774.             ΓöéRMTYPE_LDEV         ΓöépLDevNode           ΓöéRMCreateLDev        Γöé
  2775.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2776.             ΓöéRMTYPE_SYSNAME      ΓöépSysNameNode        ΓöéRMCreateSysName     Γöé
  2777.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2778.             ΓöéRMTYPE_DRIVER       ΓöépDriver             ΓöéRMCreateDriver      Γöé
  2779.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2780.  
  2781.       pResourceList (PRESOURCELIST) 
  2782.            Pointer to a structure containing a count and list of resource 
  2783.            assigned to this node. 
  2784.  
  2785.  
  2786.  
  2787.             PRESOURCELIST struct
  2788.                 {
  2789.                   ULONG          Count;
  2790.                   RESOURCESTRUCT Resource[1];
  2791.                 }
  2792.  
  2793.       Count (ULONG) 
  2794.            Count of resource structures returned. 
  2795.  
  2796.       Resource[] (RESOURCESTRUCT) 
  2797.            An array of resource structures assigned to this node. Refer to 
  2798.            RMAllocResource - Obtain a Resource Handle for a description of the 
  2799.            RESOURCESTRUCT datatype. 
  2800.  
  2801.  
  2802. ΓòÉΓòÉΓòÉ <hidden> Data Packet Format - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2803.  
  2804. All data packet fields are output fields for this function. 
  2805.  
  2806. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2807. ΓöéField          Length    Γöé
  2808. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2809. ΓöéRMNodeSize     ULONG     Γöé
  2810. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2811. ΓöéRMNode                   Γöé
  2812. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2813.  
  2814.  
  2815. ΓòÉΓòÉΓòÉ <hidden> Remarks - Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2816.  
  2817. None. 
  2818.  
  2819.  
  2820. ΓòÉΓòÉΓòÉ <hidden> Category 80h, Function 01h ΓòÉΓòÉΓòÉ
  2821.  
  2822. Category: 
  2823.    80h 
  2824.  Function: 
  2825.    01h 
  2826.  Description: 
  2827.    Get Resource Manager Node Data 
  2828.  
  2829.  Select an item: 
  2830.  
  2831.   Description
  2832.   Parameter Packet Format
  2833.   Data Packet Format
  2834.   Remarks
  2835.  
  2836.  
  2837. ΓòÉΓòÉΓòÉ 5.28.2. Enumerate Resource Manager Nodes - Function 02h ΓòÉΓòÉΓòÉ
  2838.  
  2839.  
  2840. ΓòÉΓòÉΓòÉ <hidden> Description - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2841.  
  2842. This function traverses the Resource Manager node structure and returns the 
  2843. results of the traversal as a list of Resource Manager handles and traversal 
  2844. depth. 
  2845.  
  2846.  
  2847. ΓòÉΓòÉΓòÉ <hidden> Command - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2848.  
  2849.  Command 
  2850.       Traverses the physical device tree. This traversal reports all adapters 
  2851.       and devices registered with the Resource Manager. 
  2852.  
  2853.  
  2854. ΓòÉΓòÉΓòÉ <hidden> Parameter Packet Format - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2855.  
  2856. This field must indicate the type of traversal being requested. 
  2857.  
  2858. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2859. ΓöéField       Length    Γöé
  2860. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2861. ΓöéCommand     WORD      Γöé
  2862. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2863.  
  2864.  
  2865. ΓòÉΓòÉΓòÉ <hidden> NumEntries - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2866.  
  2867.  NumEntries 
  2868.       This field reports the number of node entries traversed. 
  2869.  
  2870.  
  2871. ΓòÉΓòÉΓòÉ <hidden> NodeEntry[] - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2872.  
  2873.  NodeEntry[] 
  2874.       This field is an array of the following structure: 
  2875.  
  2876.  
  2877.  
  2878.             NODEENTRY struct
  2879.                        {
  2880.                         RMHANDLE RMHandle;
  2881.                         ULONG    Depth;
  2882.                        };
  2883.  
  2884.       RMHandle (RMHANDLE) 
  2885.            Resource Manager handle of the node traversed. 
  2886.  
  2887.       Depth (ULONG) 
  2888.            Level of the tree structure on which the node resides. 
  2889.  
  2890.  
  2891. ΓòÉΓòÉΓòÉ <hidden> Data Packet Format - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2892.  
  2893. All data packet fields are output fields for this function. 
  2894.  
  2895. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2896. ΓöéField                          Length            Γöé
  2897. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2898. ΓöéNumEntries                     ULONG             Γöé
  2899. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2900. ΓöéNodeEntry[]                    8 * NumEntries    Γöé
  2901. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2902.  
  2903.  
  2904. ΓòÉΓòÉΓòÉ <hidden> Remarks - Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2905.  
  2906. None. 
  2907.  
  2908.  
  2909. ΓòÉΓòÉΓòÉ <hidden> Category 80h, Function 02h ΓòÉΓòÉΓòÉ
  2910.  
  2911. Category: 
  2912.    80h 
  2913.  Function: 
  2914.    02h 
  2915.  Description: 
  2916.    Enumerate Resource Manager Nodes 
  2917.  
  2918.  Select an item: 
  2919.  
  2920.   Description
  2921.   Parameter Packet Format
  2922.   Data Packet Format
  2923.   Remarks
  2924.  
  2925.  
  2926. ΓòÉΓòÉΓòÉ 6. RMBASE.H ΓòÉΓòÉΓòÉ
  2927.  
  2928. /*****************************************************************************/
  2929. /*                                                                           */
  2930. /* COPYRIGHT    Copyright (C) 1992 IBM Corporation                           */
  2931. /*                                                                           */
  2932. /*    The following IBM OS/2 2.1 source code is provided to you solely for   */
  2933. /*    the purpose of assisting you in your development of OS/2 2.x device    */
  2934. /*    drivers. You may use this code in accordance with the IBM License      */
  2935. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  2936. /*    Copyright statement may not be removed.                                */
  2937. /*                                                                           */
  2938. /*****************************************************************************/
  2939. /**************************************************************************
  2940.  *
  2941.  * SOURCE FILE NAME =  RMBASE.H
  2942.  *
  2943.  * DESCRIPTIVE NAME =  RM Base types and definitions
  2944.  *
  2945.  *
  2946.  *
  2947.  * VERSION = V1.01
  2948.  *
  2949.  * DATE
  2950.  *
  2951.  * DESCRIPTION
  2952.  *
  2953.  * Purpose
  2954.  *
  2955.  *
  2956.  *
  2957.  * FUNCTIONS
  2958.  *
  2959.  * NOTES
  2960.  *
  2961.  *
  2962.  * STRUCTURES
  2963.  *
  2964.  * EXTERNAL REFERENCES
  2965.  *
  2966.  *
  2967.  *
  2968.  * EXTERNAL FUNCTIONS
  2969.  *
  2970. */
  2971.  
  2972. #ifndef __RM_HEADER__
  2973. #define __RM_HEADER__
  2974.  
  2975.  
  2976. #define CMVERSION_MAJOR    0x01
  2977. #define CMVERSION_MINOR    0x01
  2978.  
  2979. typedef ULONG    RMHANDLE, FAR *PRMHANDLE, NEAR *NPRMHANDLE;
  2980. typedef RMHANDLE HDRIVER;
  2981. typedef RMHANDLE HADAPTER;
  2982. typedef RMHANDLE HDEVICE;
  2983. typedef RMHANDLE HRESOURCE;
  2984. typedef RMHANDLE HLDEV;
  2985. typedef RMHANDLE HSYSNAME;
  2986.  
  2987. typedef HDRIVER   FAR *PHDRIVER;
  2988. typedef HDRIVER   NEAR *NPHDRIVER;
  2989. typedef HADAPTER  FAR *PHADAPTER;
  2990. typedef HADAPTER  NEAR *NPHADAPTER;
  2991. typedef HDEVICE   FAR *PHDEVICE;
  2992. typedef HDEVICE   NEAR *NPHDEVICE;
  2993. typedef HRESOURCE FAR *PHRESOURCE;
  2994. typedef HRESOURCE NEAR *NPHRESOURCE;
  2995. typedef HLDEV     FAR *PHLDEV;
  2996. typedef HLDEV     NEAR *NPHLDEV;
  2997. typedef HSYSNAME  FAR *PHSYSNAME;
  2998. typedef HSYSNAME  NEAR *NPHSYSNAME;
  2999.  
  3000. /****************************************************************************/
  3001. /*                                                                          */
  3002. /* Driver Structure                                                         */
  3003. /*                                                                          */
  3004. /****************************************************************************/
  3005.  
  3006. typedef struct {
  3007.    USHORT Year;
  3008.    UCHAR  Month;
  3009.    UCHAR  Day;
  3010. } DATESTAMP, FAR *PDATESTAMP, NEAR *NPDATESTAMP;
  3011.  
  3012.  
  3013. /* Callback for Grant/Yield; Indicates CM resolves resource to handle */
  3014. #ifdef __IBMC__
  3015. typedef ULONG PFNRMCB;
  3016. #else
  3017. typedef USHORT (_cdecl FAR *PFNRMCB)(HRESOURCE hResource);
  3018. #endif
  3019.  
  3020.  
  3021. typedef struct {
  3022.    PSZ       DrvrName;
  3023.    PSZ       DrvrDescript;
  3024.    PSZ       VendorName;
  3025.    UCHAR     MajorVer;
  3026.    UCHAR     MinorVer;
  3027.    DATESTAMP Date;
  3028.    USHORT    DrvrFlags;
  3029.    USHORT    DrvrType;
  3030.    USHORT    DrvrSubType;
  3031.    PFNRMCB   DrvrCallback;     /* Event notification */
  3032. } DRIVERSTRUCT, FAR *PDRIVERSTRUCT, NEAR *NPDRIVERSTRUCT;
  3033.  
  3034. /********************************/
  3035. /* pDriverStruct->DriverFlags */
  3036. /********************************/
  3037.  
  3038. #define DRF_DYNAMIC  0x0001
  3039. #define DRF_STATIC   0x0000
  3040.  
  3041. /* pDriverStruct->DriverType      */
  3042. /*   pDriverStruct->DriverSubType */
  3043. #define DRT_UNDEFINED        0
  3044.   #define DRS_UNDEFINED      0
  3045.  
  3046. #define DRT_PCMCIA           1
  3047.   #define DRS_SOCKETSERV     1
  3048.   #define DRS_CARDSERV       2
  3049.   #define DRS_CLIENT         3
  3050.  
  3051. #define DRT_ADDDM            2
  3052.   #define DRS_DM             1
  3053.   #define DRS_FILTER         2
  3054.   #define DRS_ADD            3
  3055.   #define DRS_DM_TRANSPORT   4
  3056.  
  3057. #define DRT_OS2              3
  3058.   #define DRS_CHAR           1
  3059.   #define DRS_BLOCK          2
  3060.   #define DRS_APP_HELPER     3
  3061.  
  3062. #define DRT_NETWORK          4
  3063. #define DRT_VIDEO            5
  3064. #define DRT_AUDIO            6
  3065. #define DRT_SERVICE          7
  3066.  
  3067. /****************************************************************************/
  3068. /*                                                                          */
  3069. /* Adapter Structure  - Device Bus                                          */
  3070. /*                                                                          */
  3071. /****************************************************************************/
  3072.  
  3073. typedef struct {
  3074.    USHORT ADDHandle;
  3075.    USHORT UnitHandle;
  3076. }ADD_UNIT, FAR *PADD_UNIT, NEAR *NPADD_UNIT;
  3077.  
  3078. typedef struct {
  3079.    USHORT VolFlags;
  3080.    USHORT VolIFSType;
  3081.    ULONG  VolSize;
  3082.    ULONG  VolID;
  3083. } DASD_VOL, FAR *PDASD_VOL, NEAR *NPDASD_VOL;
  3084.  
  3085. typedef struct _ADJUNCT FAR *PADJUNCT;
  3086. typedef struct _ADJUNCT{
  3087.    struct _ADJHEADER {
  3088.      PADJUNCT pNextAdj;
  3089.      USHORT   AdjLength;
  3090.      USHORT   AdjType;
  3091.    };
  3092.    union {
  3093.      USHORT           AdjBase;
  3094.      USHORT           SCSI_Target_LUN;
  3095.      USHORT           Adapter_Number;
  3096.      USHORT           Device_Number;
  3097.      USHORT           PCI_DevFunc;
  3098.      USHORT           Model_Info;
  3099.      ADD_UNIT         Add_Unit;
  3100.      DASD_VOL         Dasd_Vol;
  3101.    };
  3102. }ADJUNCT, NEAR *NPADJUNCT;
  3103.  
  3104. /********************************/
  3105. /* pAdjunct->AdjunctType        */
  3106. /********************************/
  3107.  
  3108. #define ADJ_HEADER_SIZE        sizeof(struct _ADJHEADER)
  3109.  
  3110. #define ADJ_SCSI_TARGET_LUN    1
  3111. #define ADJ_ADAPTER_NUMBER     2
  3112. #define ADJ_DEVICE_NUMBER      3
  3113. #define ADJ_PCI_DEVFUNC        4
  3114. #define ADJ_MODEL_INFO         5
  3115. #define ADJ_ADD_UNIT           6
  3116. #define ADJ_DASD_VOL           7
  3117.  
  3118.  
  3119. typedef struct{
  3120.    PSZ          AdaptDescriptName;
  3121.    USHORT       AdaptFlags;
  3122.    USHORT       BaseType;             /* From PCI/PNP */
  3123.    USHORT       SubType;
  3124.    USHORT       InterfaceType;
  3125.    USHORT       HostBusType;
  3126.    USHORT       HostBusWidth;
  3127.    PADJUNCT     pAdjunctList;
  3128.    ULONG        Reserved;             /* Logical Name addition? */
  3129. } ADAPTERSTRUCT, FAR *PADAPTERSTRUCT, NEAR *NPADAPTERSTRUCT;
  3130.  
  3131. /********************************/
  3132. /* pAdapteStruct->BaseType      */
  3133. /* pAdapteStruct->Sub           */
  3134. /* pAdapteStruct->InterfaceType */
  3135. /* From PNP/PCI Specs           */
  3136. /********************************/
  3137.  
  3138. #define AS_BASE_RESERVED          0x00
  3139.  #define AS_SUB_OTHER             0x80      /* Can Be used by any BASE type */
  3140.   #define AS_INTF_GENERIC         0x01      /* Can Be used by any SUB type  */
  3141.  
  3142. #define AS_BASE_MSD               0x01      /* Mass Storage Device          */
  3143.  #define AS_SUB_SCSI              0x01
  3144.  #define AS_SUB_IDE               0x02
  3145.  #define AS_SUB_FLPY              0x03
  3146.  #define AS_SUB_IPI               0x04
  3147.  
  3148. #define AS_BASE_NETWORK           0x02     /* Network Interface Controller */
  3149.  #define AS_SUB_ETHERNET          0x01
  3150.  #define AS_SUB_TOKENRING         0x02
  3151.  #define AS_SUB_FDDI              0x03
  3152.  
  3153. #define AS_BASE_DISPLAY           0x03     /* Display Controller           */
  3154.  #define AS_SUB_VGA               0x01
  3155.   #define AS_INTF_VGA_GEN         0x01
  3156.   #define AS_INTF_VESA_SVGA       0x02
  3157.  #define AS_SUB_XGA               0x02
  3158.  
  3159.  
  3160. #define AS_BASE_MMEDIA            0x04     /* Multi-media Controller       */
  3161.  #define AS_SUB_MM_VIDEO          0x01
  3162.  #define AS_SUB_MM_AUDIO          0x02
  3163.  
  3164. #define AS_BASE_MEMORY            0x05    /* Memory                       */
  3165.  #define AS_SUB_BIOS_ROM          0x01
  3166.  
  3167. #define AS_BASE_BRIDGE            0x06    /* Bridge Controller            */
  3168.  
  3169. #define AS_BASE_COMM              0x07    /* Communications Device        */
  3170.  #define AS_SUB_SERIAL            0x01
  3171.   #define AS_INTF_16450           0x01
  3172.   #define AS_INTF_16550           0x02
  3173.  #define AS_SUB_PARALLEL          0x02
  3174.   #define AS_INTF_BIDI            0x01
  3175.   #define AS_INTF_ECP             0x02
  3176.  
  3177. #define AS_BASE_PERIPH            0x08    /* System Peripherals          */
  3178.  #define AS_SUB_PIC               0x01
  3179.   #define AS_INTF_ISAPIC          0x01
  3180.   #define AS_INTF_EISAPIC         0x02
  3181.  #define AS_SUB_DMA               0x02
  3182.  #define AS_SUB_TIMER             0x03
  3183.  #define AS_SUB_RTC               0x04
  3184.  
  3185. #define AS_BASE_INPUT             0x09    /* Input Device                */
  3186.  #define AS_SUB_KBD               0x01
  3187.  #define AS_SUB_DIGIT             0x02
  3188.  #define AS_SUB_MOUSE             0x03
  3189.  
  3190. #define AS_BASE_DOCK              0x0a    /* Docking Station             */
  3191.  
  3192. #define AS_BASE_CPU               0x0b    /* CPU                         */
  3193.  
  3194. #define AS_BASE_PCMCIA            0x0c    /* PCMCIA                      */
  3195.  #define AS_SUB_SOCKET_CONTROLLER 0x01    /* Socket Controller           */
  3196.  
  3197. #define AS_BASE_BIOS_ROM          0x0d
  3198.  
  3199. /********************************/
  3200. /* pAdapterStruct->HostBusType  */
  3201. /********************************/
  3202.  
  3203. #define  AS_HOSTBUS_OTHER       0x00
  3204. #define  AS_HOSTBUS_ISA         0x01
  3205. #define  AS_HOSTBUS_EISA        0x02
  3206. #define  AS_HOSTBUS_uCHNL       0x03
  3207. #define  AS_HOSTBUS_PCI         0x04
  3208. #define  AS_HOSTBUS_SCSI        0x05
  3209. #define  AS_HOSTBUS_PCMCIA      0x06
  3210. #define  AS_HOSTBUS_PARALLEL    0x07
  3211. #define  AS_HOSTBUS_PLANAR      0x08
  3212. #define  AS_HOSTBUS_UNKNOWN     0xff
  3213. /* Others SERIAL??? */
  3214.  
  3215. /********************************/
  3216. /* pAdapterStruct->HostBusWidth */
  3217. /********************************/
  3218.  
  3219. #define  AS_BUSWIDTH_8BIT       0x10
  3220. #define  AS_BUSWIDTH_16BIT      0x20
  3221. #define  AS_BUSWIDTH_32BIT      0x30
  3222. #define  AS_BUSWIDTH_64BIT      0x40
  3223. #define  AS_BUSWIDTH_UNKNOWN    0xf0
  3224.  
  3225. /********************************/
  3226. /* pAdapterStruct->AdapterFlags */
  3227. /********************************/
  3228.  
  3229. #define AS_16MB_ADDRESS_LIMIT       0x01
  3230. #define AS_NO16MB_ADDRESS_LIMIT     0x00
  3231.  
  3232. /****************************************************************************/
  3233. /*                                                                          */
  3234. /* Device Structure  - Object hanging off Adapter                           */
  3235. /*                                                                          */
  3236. /****************************************************************************/
  3237.  
  3238. typedef struct {
  3239.    PSZ      DevDescriptName;
  3240.    USHORT   DevFlags;
  3241.    USHORT   DevType;
  3242.    PADJUNCT pAdjunctList;
  3243. } DEVICESTRUCT, FAR *PDEVICESTRUCT, NEAR *NPDEVICESTRUCT;
  3244.  
  3245. /********************************/
  3246. /* pDeviceStruct->DevType       */
  3247. /********************************/
  3248.  
  3249.  
  3250. #define  DS_TYPE_DISK            0x0000     /* All Direct Access Devices        */
  3251. #define  DS_TYPE_TAPE            0x0001     /* Sequencial Access Devices        */
  3252. #define  DS_TYPE_PRINTER         0x0002     /* Printer Device                   */
  3253. #define  DS_TYPE_PROCESSOR       0x0003     /* Processor type device            */
  3254. #define  DS_TYPE_WORM            0x0004     /* Write Once Read Many Device      */
  3255. #define  DS_TYPE_CDROM           0x0005     /* CD ROM Device                    */
  3256. #define  DS_TYPE_SCANNER         0x0006     /* Scanner Device                   */
  3257. #define  DS_TYPE_OPT_MEM         0x0007     /* some Optical disk                */
  3258. #define  DS_TYPE_CHANGER         0x0008     /* Changer device e.g. juke box     */
  3259. #define  DS_TYPE_COMM            0x0009     /* Communication devices            */
  3260. #define  DS_TYPE_ATAPI           0x000A     /* Unspecific ATAPI protocol device */
  3261. #define  DS_TYPE_SCSI_ATT        0x000B     /* SCSI Attach                      */
  3262. #define  DS_TYPE_SOCKET          0x000C     /* PCMCIA Socket                    */
  3263. #define  DS_TYPE_SLOT            0x000D     /* Bus Slot                         */
  3264. #define  DS_TYPE_PLANAR_CHIPSET  0x000E     /* DMA/IRQ/TIMER Controllers        */
  3265. #define  DS_TYPE_IO              0x000F     /* Input/Output                     */
  3266. #define  DS_TYPE_AUDIO           0x0010     /* Audio Device                     */
  3267. #define  DS_TYPE_UNKNOWN         0xFFFF
  3268.  
  3269. /********************************/
  3270. /* pDeviceStruct->DevFlags      */
  3271. /********************************/
  3272.  
  3273. #define DS_REMOVEABLE_MEDIA  0x01
  3274. #define DS_FIXED_LOGICALNAME 0x02
  3275.  
  3276.  
  3277.  
  3278. typedef struct {
  3279.    ULONG     NumDevices;
  3280.    HDEVICE   hDevice[1];        /* First Entry in array of HRESOURCE */
  3281.    }AHDEVICES, FAR *PAHDEVICES, NEAR *NPAHDEVICES;
  3282.  
  3283.  
  3284. /****************************************************************************/
  3285. /*                                                                          */
  3286. /* Resource Structure                                                       */
  3287. /*                                                                          */
  3288. /****************************************************************************/
  3289.  
  3290. typedef struct {
  3291.    USHORT BaseIOPort;
  3292.    USHORT NumIOPorts;
  3293.    USHORT IOFlags;
  3294.    USHORT IOAddressLines;
  3295. } IORESOURCE, FAR *PIORESOURCE, NEAR *NPIORESOURCE;
  3296.  
  3297. #define RS_SERVER         0x8000
  3298.  
  3299. /********************************/
  3300. /* pIOResource->Flags           */
  3301. /********************************/
  3302.  
  3303. #define RS_IO_EXCLUSIVE    0x0001
  3304. #define RS_IO_MULTIPLEXED  0x0002
  3305. #define RS_IO_SHARED       0x0004
  3306. #define RS_IO_RECONFIGURE  0x0008
  3307. #define RS_IO_GRANT_YIELD  0x0010
  3308. #define RS_IO_FORCE_ALIAS  0x0020
  3309. #define RS_SEARCH          0x4000
  3310.  
  3311. /****************************************************************************/
  3312. /*                                                                          */
  3313. /* IRQ Resource Structure                                                   */
  3314. /*                                                                          */
  3315. /****************************************************************************/
  3316.  
  3317. /* Interrupt handler for Grant/Yield with RM routing interrupts       */
  3318. #ifdef __IBMC__
  3319. typedef ULONG PFNRMINTHANDLER;
  3320. #else
  3321. typedef USHORT (_cdecl FAR *PFNRMINTHANDLER)(VOID);
  3322. #endif
  3323.  
  3324. typedef struct {
  3325.    USHORT  IRQLevel;                       /* < 16 */
  3326.    USHORT  PCIIrqPin;                      /* < 5  */
  3327.    USHORT  IRQFlags;
  3328.    USHORT  Reserved;                       /* Alignment for 32 bit code */
  3329.    PFNRMINTHANDLER pfnIntHandler;
  3330. } IRQRESOURCE, FAR *PIRQRESOURCE, NEAR *NPIRQRESOURCE;
  3331.  
  3332. /********************************/
  3333. /* pIRQResource->PCIIrqPin      */
  3334. /********************************/
  3335. #define RS_PCI_INT_NONE 0    /* For completeness, on non-PCI box */
  3336. #define RS_PCI_INT_A    1
  3337. #define RS_PCI_INT_B    2
  3338. #define RS_PCI_INT_C    3
  3339. #define RS_PCI_INT_D    4
  3340.  
  3341.  
  3342. /********************************/
  3343. /* pIRQResource->Flags          */
  3344. /********************************/
  3345.  
  3346. #define RS_IRQ_EXCLUSIVE     0x01
  3347. #define RS_IRQ_MULTIPLEXED   0x02
  3348. #define RS_IRQ_SHARED        0x04
  3349. #define RS_IRQ_RECONFIGURE   0x08
  3350. #define RS_IRQ_GRANT_YIELD   0x10
  3351. #define RS_IRQ_ROUTER        0x20
  3352.  
  3353. /****************************************************************************/
  3354. /*                                                                          */
  3355. /* MEM Resource Structure                                                   */
  3356. /*                                                                          */
  3357. /****************************************************************************/
  3358.  
  3359. typedef struct {
  3360.    ULONG  MemBase;
  3361.    ULONG  MemSize;
  3362.    USHORT MemFlags;
  3363.    USHORT ReservedAlign;    /* Alignment for 32-bit code */
  3364. } MEMRESOURCE, FAR *PMEMRESOURCE, NEAR *NPMEMRESOURCE;
  3365.  
  3366.  
  3367. /********************************/
  3368. /* pMemResource->Flags          */
  3369. /********************************/
  3370.  
  3371. #define RS_MEM_EXCLUSIVE     0x01
  3372. #define RS_MEM_MULTIPLEXED   0x02
  3373. #define RS_MEM_SHARED        0x04
  3374. #define RS_MEM_RECONFIGURE   0x08
  3375. #define RS_MEM_GRANT_YIELD   0x10
  3376.  
  3377. /****************************************************************************/
  3378. /*                                                                          */
  3379. /* DMA Resource Structure                                                   */
  3380. /*                                                                          */
  3381. /****************************************************************************/
  3382.  
  3383. typedef struct {
  3384.    USHORT DMAChannel;
  3385.    USHORT DMAFlags;
  3386. } DMARESOURCE, FAR *PDMARESOURCE, NEAR *NPDMARESOURCE;
  3387.  
  3388. /********************************/
  3389. /* pDMAResource->Flags          */
  3390. /********************************/
  3391.  
  3392. #define RS_DMA_EXCLUSIVE     0x01
  3393. #define RS_DMA_MULTIPLEXED   0x02
  3394. #define RS_DMA_SHARED        0x04
  3395. #define RS_DMA_RECONFIGURE   0x08
  3396. #define RS_DMA_GRANT_YIELD   0x10
  3397.  
  3398. /****************************************************************************/
  3399. /*                                                                          */
  3400. /* Timer Resource Structure                                                 */
  3401. /*                                                                          */
  3402. /****************************************************************************/
  3403.  
  3404. typedef struct {
  3405.    USHORT TMRChannel;
  3406.    USHORT TMRFlags;
  3407. } TMRRESOURCE, FAR *PTMRRESOURCE, NEAR *NPTMRRESOURCE;
  3408.  
  3409.  
  3410. /********************************/
  3411. /* pTmrResource->Flags          */
  3412. /********************************/
  3413.  
  3414. #define RS_TMR_EXCLUSIVE   0x01
  3415. #define RS_TMR_MULTIPLEXED 0x02
  3416. #define RS_TMR_SHARED      0x04
  3417.  
  3418.  
  3419. /****************************************************************************/
  3420.  
  3421. typedef struct {
  3422.    ULONG ResourceType;
  3423.    union {
  3424.       IORESOURCE   IOResource;
  3425.       IRQRESOURCE  IRQResource;
  3426.       MEMRESOURCE  MEMResource;
  3427.       DMARESOURCE  DMAResource;
  3428.       TMRRESOURCE  TMRResource;
  3429.      };
  3430.    ULONG  Reserved;
  3431. } RESOURCESTRUCT, FAR *PRESOURCESTRUCT, NEAR *NPRESOURCESTRUCT;
  3432.  
  3433. /*********************************/
  3434. /* pResourceStruct->ResourceType */
  3435. /*********************************/
  3436.  
  3437. #define RS_TYPE_IO    1
  3438. #define RS_TYPE_IRQ   2
  3439. #define RS_TYPE_MEM   3
  3440. #define RS_TYPE_DMA   4
  3441. #define RS_TYPE_TIMER 5
  3442. #define RS_TYPE_NEW   0xffff
  3443.  
  3444. typedef struct {
  3445.    ULONG     NumResource;
  3446.    HRESOURCE hResource[1];      /*First Entry in Array of HRESOURCE */
  3447. }AHRESOURCE, FAR *PAHRESOURCE, NEAR *NPAHRESOURCE;
  3448.  
  3449. /********************************/
  3450. /* RMModifyResource Command     */
  3451. /********************************/
  3452. #define RM_MODIFY_ADD    0
  3453. #define RM_MODIFY_DELETE 1
  3454.  
  3455. /****************************************************************************/
  3456. /*                                                                          */
  3457. /* LDEV - Logical Device Structure                                          */
  3458. /*                                                                          */
  3459. /****************************************************************************/
  3460.  
  3461. typedef struct {
  3462.    PSZ      LDevDescriptName;
  3463.    USHORT   LDevFlags;
  3464.    USHORT   LDevClass;
  3465.    HDEVICE  LDevHDevice;
  3466.    PADJUNCT pAdjunctList;
  3467. } LDEVSTRUCT, FAR *PLDEVSTRUCT, NEAR *NPLDEVSTRUCT;
  3468.  
  3469. /*********************************/
  3470. /* pLDevStruct->LDevFlags        */
  3471. /*********************************/
  3472. /*- TBD -*/
  3473.  
  3474. #define LDEV_CLASS_BASE         0
  3475. #define LDEV_CLASS_ROOT         (LDEV_CLASS_BASE+1)
  3476. #define LDEV_CLASS_DASD         (LDEV_CLASS_BASE+2)
  3477. #define LDEV_CLASS_CDROM        (LDEV_CLASS_BASE+3)
  3478. #define LDEV_CLASS_SERIAL       (LDEV_CLASS_BASE+4)
  3479. #define LDEV_CLASS_PARALLEL     (LDEV_CLASS_BASE+5)
  3480. #define LDEV_CLASS_TAPE         (LDEV_CLASS_BASE+6)
  3481.  
  3482. #define NUM_LDEV_CLASSES        6
  3483. #define MAX_LDEV_CLASSES        10
  3484.  
  3485. /****************************************************************************/
  3486. /*                                                                          */
  3487. /* SYSNAME - System Name                                                    */
  3488. /*                                                                          */
  3489. /****************************************************************************/
  3490.  
  3491. typedef struct {
  3492.    PSZ      SysDescriptName;
  3493.    PADJUNCT pAdjunctList;
  3494.    USHORT   SysFlags;
  3495.    USHORT   Reserved;
  3496. } SYSNAMESTRUCT, FAR *PSYSNAMESTRUCT, NEAR *NPSYSNAMESTRUCT;
  3497.  
  3498.  
  3499. /****************************************************************************/
  3500. /*                                                                          */
  3501. /* Handle List Structure                                                    */
  3502. /*                                                                          */
  3503. /****************************************************************************/
  3504.  
  3505. typedef struct
  3506. {
  3507.   USHORT        cMaxHandles;
  3508.   USHORT        cHandles;
  3509.   HADAPTER      Handles[1];
  3510.  
  3511. } HANDLELIST, FAR *PHANDLELIST, NEAR *NPHANDLELIST;
  3512.  
  3513. typedef struct _ADJINFO
  3514. {
  3515.     HADAPTER    hAdapter;
  3516.     USHORT      AdjIndex;
  3517.  
  3518. } ADJINFO;
  3519.  
  3520. typedef struct
  3521. {
  3522.   USHORT        cMaxHandles;
  3523.   USHORT        cHandles;
  3524.   ADJINFO       Adj[1];
  3525.  
  3526. } ADJHANDLELIST, FAR *PADJHANDLELIST, NEAR *NPADJHANDLELIST;
  3527.  
  3528. /****************************************************************************/
  3529. /*                                                                          */
  3530. /* PreAssigned Node Handles                                                 */
  3531. /*                                                                          */
  3532. /****************************************************************************/
  3533.  
  3534. #define HANDLE_PHYS_TREE        0xffff8000
  3535. #define HANDLE_SYS_TREE         0xffff8001
  3536. #define HANDLE_DEFAULT_SYSBUS   0xffff8002
  3537. #define HANDLE_X_BUS            0xffff8003
  3538. #define HANDLE_PCI_BUS          0xffff8004
  3539.  
  3540. /****************************************************************************/
  3541. /*                                                                          */
  3542. /* Handle Types                                                             */
  3543. /*                                                                          */
  3544. /****************************************************************************/
  3545.  
  3546. #define HANDLE_TYPE_INVALID     0
  3547. #define HANDLE_TYPE_DRIVER      1
  3548. #define HANDLE_TYPE_ADAPTER     2
  3549. #define HANDLE_TYPE_DEVICE      3
  3550. #define HANDLE_TYPE_RESOURCE    4
  3551. #define HANDLE_TYPE_LOGDEV      5
  3552. #define HANDLE_TYPE_SYSDEV      6
  3553.  
  3554. #endif /* __RM_HEADER__ */
  3555.  
  3556.  
  3557. /****************************************************************************/
  3558. /*                                                                          */
  3559. /* Comon Keys                                                               */
  3560. /*                                                                          */
  3561. /****************************************************************************/
  3562.  
  3563. #define KEY_FIXDISK      "DISK_#      "
  3564. #define KEY_TAPE         "TAPE_#      "
  3565. #define KEY_PRINTER      "PRINTER_#      "
  3566. #define KEY_CPU          "CPU_#      "
  3567. #define KEY_WORM         "WORM_#      "
  3568. #define KEY_CDROM        "CDROM_#      "
  3569. #define KEY_SCANNER      "SCANNER_#      "
  3570. #define KEY_OPTICAL_MEM  "OPTICAL_MEM_#      "
  3571. #define KEY_CHANGER      "CHANGER_#      "
  3572. #define KEY_COMM         "COMM_#      "
  3573. #define KEY_SCSI_UNKNOWN "UNKNOWN_#      "
  3574.