Difference between revisions of "RMCreateDetected"

From EDM2
Jump to: navigation, search
(Created page with "This service is supported by both rminfo.dll and rmcalls.lib. It obtains a detected driver handle. The detected devices found by snoopers or bus enumerators (ISA PNP) and reco...")
 
m
 
Line 1: Line 1:
This service is supported by both rminfo.dll and rmcalls.lib. It obtains a detected driver handle. The detected devices found by snoopers or bus enumerators (ISA PNP) and recorded in the DETECTEDSTRUCT structure are registered with the Resource Manager.  
+
This service is supported by both rminfo.dll and rmcalls.lib. It obtains a detected driver handle. The detected devices found by snoopers or bus enumerators (ISA PNP) and recorded in the DETECTEDSTRUCT structure are registered with the Resource Manager.
  
 
==Syntax==
 
==Syntax==
 
  RMCreateDetected(hDriver, phDetected, pDetectedStruct, phaResource);
 
  RMCreateDetected(hDriver, phDetected, pDetectedStruct, phaResource);
 +
 
==Parameters==
 
==Parameters==
; hDriver (HDRIVER) - input : Driver handle of the enumerator/snooper driver that creates this adapter.  
+
;hDriver (HDRIVER) - input: Driver handle of the enumerator/snooper driver that creates this adapter.
 +
;phDetected (PHDETECTED) - output: Pointer to the variable to receive the detected driver handle.
 +
;pDetectedStruct (PDETECTEDSTRUCT) - input: Pointer to the [[DETECTEDSTRUCT]].
 +
;phaResource (PAHRESOURCE) - input: Pointer to a structure containing a count and a list of resource handles to be reserved for the specified PnP device.
  
; phDetected (PHDETECTED) - output : Pointer to the variable to receive the detected driver handle.
 
 
; pDetectedStruct (PDETECTEDSTRUCT) - input : Pointer to the DETECTEDSTRUCT.
 
 
; phaResource (PAHRESOURCE) - input : Pointer to a structure containing a count and a list of resource handles to be reserved for the specified PnP device.
 
 
==Return Code==
 
==Return Code==
; rc (APIRET) - returns : On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
+
;rc (APIRET) - returns: On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
 
+
RMRC_BAD_DRIVERHANDLE
    RMRC_BAD_DRIVERHANDLE
+
RMRC_BAD_FLAGS
    RMRC_BAD_FLAGS
+
RMRC_BAD_RESOURCEHANDLE
    RMRC_BAD_RESOURCEHANDLE
+
RMRC_NULL_POINTER
    RMRC_NULL_POINTER
+
RMRC_NULL_STRINGS
    RMRC_NULL_STRINGS
+
RMRC_SUCCESS
    RMRC_SUCCESS
+
  
 
==Example Code==
 
==Example Code==
Line 33: Line 31:
 
APIRET            rc;
 
APIRET            rc;
  
rc = RMCreateDetected(hDriver, phDetected,
+
rc = RMCreateDetected(hDriver, phDetected, pDetectedStruct, phaResource);
      pDetectedStruct, phaResource);
+
 
</PRE>
 
</PRE>
  
 
[[Category:DevHlps]]
 
[[Category:DevHlps]]

Latest revision as of 21:47, 23 May 2020

This service is supported by both rminfo.dll and rmcalls.lib. It obtains a detected driver handle. The detected devices found by snoopers or bus enumerators (ISA PNP) and recorded in the DETECTEDSTRUCT structure are registered with the Resource Manager.

Syntax

RMCreateDetected(hDriver, phDetected, pDetectedStruct, phaResource);

Parameters

hDriver (HDRIVER) - input
Driver handle of the enumerator/snooper driver that creates this adapter.
phDetected (PHDETECTED) - output
Pointer to the variable to receive the detected driver handle.
pDetectedStruct (PDETECTEDSTRUCT) - input
Pointer to the DETECTEDSTRUCT.
phaResource (PAHRESOURCE) - input
Pointer to a structure containing a count and a list of resource handles to be reserved for the specified PnP device.

Return Code

rc (APIRET) - returns
On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
RMRC_BAD_DRIVERHANDLE
RMRC_BAD_FLAGS
RMRC_BAD_RESOURCEHANDLE
RMRC_NULL_POINTER
RMRC_NULL_STRINGS
RMRC_SUCCESS

Example Code

C

#include <os2.h>
#include <rmcalls.h>

HDRIVER            hDriver;
PHDETECTED         phDetected;
PDETECTEDSTRUCT    pDetectedStruct;
PAHRESOURCE        phaResource;
APIRET             rc;

rc = RMCreateDetected(hDriver, phDetected, pDetectedStruct, phaResource);