RMCALLS.LIB: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
The RMCALLS library code linked to a driver will provide rudimentary support for cases in which RESOURCE.SYS is not loaded on a system. Typically, a handle value of -1L and a return code of RMRC_SUCCESS will occur. In this manner, the driver code might not need to know about the presence of RESOURCE.SYS on a system, and can assume that all resources are available. This was the behavior previous to implementing Resource Manager. | The RMCALLS library code linked to a driver will provide rudimentary support for cases in which [[RESOURCE.SYS]] is not loaded on a system. Typically, a handle value of -1L and a return code of RMRC_SUCCESS will occur. In this manner, the driver code might not need to know about the presence of RESOURCE.SYS on a system, and can assume that all resources are available. This was the behavior previous to implementing Resource Manager. | ||
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> | <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> | ||
Line 38: | Line 38: | ||
==RMCALLS Library Data== | ==RMCALLS Library Data== | ||
The RMCALLS library references the following four variables: | The RMCALLS library references the following four variables: | ||
PFN Device_Help; | |||
ULONG RMFlags = NULL; | |||
PFNRM RM_Help0 = NULL; | |||
PFNRM RM_Help3 = NULL; | |||
The PFN Device_Help variable must be initialized by your driver prior to calling any Resource Manager services. It is expected to contain the Device Help entry point provided in the OS/2 Init Request Packet your driver receives. | The PFN Device_Help variable must be initialized by your driver prior to calling any Resource Manager services. It is expected to contain the Device Help entry point provided in the OS/2 Init Request Packet your driver receives. | ||
Line 54: | Line 52: | ||
==RMCALLS Library Code== | ==RMCALLS Library Code== | ||
The code portion of the RMCALLS library is included in a segment named RMCode. There are three alternatives in handling the code in this segment: | The code portion of the RMCALLS library is included in a segment named RMCode. There are three alternatives in handling the code in this segment: | ||
* Combine RMCode with your driver's default code segment if your driver does not intend to use Resource Manager services after initialization. Because the library code is linked after OBJ text, it would be discarded as your driver discards its initialization code. | * Combine RMCode with your driver's default code segment if your driver does not intend to use Resource Manager services after initialization. Because the library code is linked after OBJ text, it would be discarded as your driver discards its initialization code. | ||
* Combine RMCode with your driver's swappable code segment. If your driver intends to use Resource Manager services after its initialization and has a swappable code segment, then combine RMCode with this segment. | * Combine RMCode with your driver's swappable code segment. If your driver intends to use Resource Manager services after its initialization and has a swappable code segment, then combine RMCode with this segment. | ||
* Place RMCode in its own swappable segment. If your driver does not have a swappable code segment, then the RMCode will reside in its own swappable segment by default. | * Place RMCode in its own swappable segment. If your driver does not have a swappable code segment, then the RMCode will reside in its own swappable segment by default. | ||
[[Category:Files]] | [[Category:Files]] |
Revision as of 18:53, 22 August 2017
The RMCALLS library code linked to a driver will provide rudimentary support for cases in which RESOURCE.SYS is not loaded on a system. Typically, a handle value of -1L and a return code of RMRC_SUCCESS will occur. In this manner, the driver code might not need to know about the presence of RESOURCE.SYS on a system, and can assume that all resources are available. This was the behavior previous to implementing Resource Manager.
- RMADDToHDevice
- RMAdjToHandleList
- RMAllocResource
- RMConvertID
- RMCreateAdapter
- RMCreateDetected
- RMCreateDevice
- RMCreateDriver
- RMCreateLDev
- RMCreateSysName
- RMDeAllocResource
- RMDestroyAdapter
- RMDestroyDetected
- RMDestroyDevice
- RMDestroyDriver
- RMDestroyLDev
- RMDestroySysName
- RMDevIDToHandleList
- RMGetCommandLine
- RMGetDriverName
- RMGetNodeInfo
- RMGetVersion
- RMHandleToParent
- RMHandleToResourceHandleList
- RMHandleToType
- RMHDevToHLDev
- RMKeyToHandleList
- RMModifyNodeFlags
- RMModifyResources
- RMParseSCSIInquiry
- RMResToHandleList
- RMUpdateAdjunct
RMCALLS Library Data
The RMCALLS library references the following four variables:
PFN Device_Help; ULONG RMFlags = NULL; PFNRM RM_Help0 = NULL; PFNRM RM_Help3 = NULL;
The PFN Device_Help variable must be initialized by your driver prior to calling any Resource Manager services. It is expected to contain the Device Help entry point provided in the OS/2 Init Request Packet your driver receives.
Prior to calling any Resource Manager services, the remaining data variables must be initialized to zero. Specify C-initializers when declaring the variables.
These variables must be allocated by your driver. If you plan to use Resource Manager services after your driver has completed initialization, you must ensure that these variables are not discarded.
Note: If you do not declare these variables, a linker error message will occur, indicating that they are missing.
RMCALLS Library Code
The code portion of the RMCALLS library is included in a segment named RMCode. There are three alternatives in handling the code in this segment:
- Combine RMCode with your driver's default code segment if your driver does not intend to use Resource Manager services after initialization. Because the library code is linked after OBJ text, it would be discarded as your driver discards its initialization code.
- Combine RMCode with your driver's swappable code segment. If your driver intends to use Resource Manager services after its initialization and has a swappable code segment, then combine RMCode with this segment.
- Place RMCode in its own swappable segment. If your driver does not have a swappable code segment, then the RMCode will reside in its own swappable segment by default.