Jump to content

RMCreateDetected

From EDM2
Revision as of 21:00, 30 July 2018 by Martini (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);