## Physical Device Driver Reference

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

### RMCreateAdapter - Calling Sequence

This service is supported by both rminfo.dll and rmcalls.lib. It obtains an adapter handle and allows a driver to register an adapter with the Resource Manager. An adapter handle (HADAPTER) is returned by this service to identify the adapter. Information about the adapter being registered is passed in an ADAPTERSTRUCT.

When an adapter is registered, a list of resource handles representing hardware resources used by this adapter may be optionally passed.

    #include <os2.h>

    #include <rmcalls.h>

    HDRIVER           hDriver;

    PHADAPTER         hAdapter;

    PADAPTERSTRUCT    AdapterStruct;

    HDEVICE           hParentDevice;

    PAHRESOURCE       ResourceList;

    APIRET            rc;

    rc = RMCreateAdapter(hDriver, hAdapter, AdapterStruct,

           hParentDevice, ResourceList);