## Physical Device Driver Reference

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

### RMCreateDevice - Calling Sequence

This rmcall service obtains a device handle and allows a driver to register a device with the Resource Manager and assign the device to an adapter. A device handle (HDEVICE) is returned by this service to identify the device.

    #include <os2.h>

    #include <rmcalls.h>

    HDRIVER          hDriver;

    PHDEVICE         hDevice;

    PDEVICESTRUCT    DeviceStruct;

    HADAPTER         hParentAdapter;

    PAHRESOURCE      ResourceList;

    APIRET           rc;

    rc = RMCreateDevice(hDriver, hDevice, DeviceStruct,

           hParentAdapter, ResourceList);