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
);
SmartcardAcquireRemoveLock returns an NTSTATUS value. Possible values are the following.
| Value | Meaning |
|---|---|
| STATUS_INVALID_PARAMETER_1 | LinlName is NULL. |
| STATUS_INVALID_PARAMETER_2 | DeviceName is NULL. |
| STATUS_INSUFFICIENT_RESOURCES | Could not allocate memory for the link name. |
Declared in smclib.h. Include smclib.h.
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, the memory pointed to by 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).