Previous Next

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
Pointer to an uninitialized UNICODE_STRING that receives the result.
DeviceName
Pointer to a UNICODE_STRING that indicates the existing device name for which the link should be created.

Return Value

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.

Headers

Declared in smclib.h. Include smclib.h.

Comments

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).

See Also

SmartcardDeleteLink (WDM)