Previous Next

VxD_CreateDevice (VxD)

The VxD_CreateDevice function creates a new instance of a device. This function can be used if your driver supports multiple devices of the same type (for example, serial smart card reader).

PVMMDDB VXDINLINE 
  VxD_CreateDevice(
    char  *Device, 
    void  (*ControlProc)(void)
    );

Parameters

Device
The name of the device to be created. Should not exceed eight characters.
ControlProc
The address of your driver's control procedure (usually located in an assembly language module). Do not confuse this with the driver's DeviceIoControl routine.

Return Value

VxD_CreateDevice returns a pointer to a device description block.

Headers

Declared in smclib.h. Include smclib.h.

Comments

Store the returned device description block in the operating-system-dependent data structure of your device extension. You can use this value in your DeviceIoControl routine to distinguish the device instance, since you should usually use the same DeviceIoControl routine for all your instances.

This function is not available when developing WDM drivers. For a list of the functions that can be used, see WDM Smart Card Driver Functions.

See Also

VxD_DeleteDevice (VxD)