## Physical Device Driver Reference

[prev][next][parent][TOC]

### RMCreateDriver - Calling Sequence

This service is supported by both rminfo.dll and rmcalls.lib. It obtains a driver handle. It also registers basic information about calling the device driver with the Resource Manager. A driver handle (HDRIVER) is returned by this service and is required by other Resource Manager services to identify the requestor.

The first call to this service causes the Resource Manager interface code ( the part that is linked to your driver) to initialize. Therefore, this function is the first Resource Manager call a driver usually makes.

Information about the driver registering with the Resource Manager is passed in a DRIVERSTRUCT.

    #include <os2.h>

    #include <rmcalls.h>

    PDRIVERSTRUCT    DriverStruct;

    PHDRIVER         hDriver;

    APIRET           rc;

    rc = RMCreateDriver(DriverStruct, hDriver);