SmartcardCreateLink (WDM)

The SmartcardCreateLink function creates a DOS device name that the smart card resource manager uses to access the device.

NTSTATUS 
SmartcardCreateLink(
  IN OUT PUNICODE_STRING LinkName,
  IN PUNICODE_STRING DeviceName
);

Parameters

LinkName
Points to an uninitialized UNICODE_STRING that receives the result.
DeviceName
Points to an existing device name for which the link should be created.

Remarks

SmartcardCreateLink creates a DOS device name and a symbolic link that the smart card resource manager can access. The name is usually a string like \DosDevices\SCReaderN, where N is a zero-based reader number. This function allocates a buffer that is large enough to hold the DOS device name. It is not necessary to provide a buffer. When the driver unloads the buffer, LinkName->Buffer must be freed. This function is commonly used in the DriverEntry routine.

For information on the SmartcardCreateLink function for VxD drivers, see SmartcardCreateLink (VxD).