共用方式為


SmartcardCreateLink (WDM) routine

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

Syntax

NTSTATUS SmartcardCreateLink(
   PUNICODE_STRING LinkName,
   PUNICODE_STRING DeviceName
);

Parameters

  • LinkName
    A pointer to an uninitialized UNICODE_STRING that receives the result.

  • DeviceName
    A pointer to a UNICODE_STRING that contains the existing device name to create the link for.

Return value

SmartcardCreateLink returns one of the following NTSTATUS values:

Return code Description
STATUS_INVALID_PARAMETER_1

LinkName is NULL.

STATUS_INVALID_PARAMETER_2

DeviceName is NULL.

STATUS_INSUFFICIENT_RESOURCES

This routine could not allocate memory for the link name.

 

Remarks

SmartcardCreateLink creates a device name and a symbolic link that the smart card resource manager can access. The name is a string, usually "\DosDevices\SCReaderN", where N is a zero-based reader number. SmartcardCreateLink, which is generally called by the DriverEntry routine, allocates a buffer that is large enough to hold the device name. When the driver unloads the buffer, it must free the memory that LinkName->Buffer points to.

Requirements

Target platform

Desktop

Version

Available in Windows XP and later versions of Windows.

Header

Smclib.h (include Smclib.h)

Library

Smclib.lib

IRQL

PASSIVE_LEVEL

See also

UNICODE_STRING

 

 

Send comments about this topic to Microsoft