Export (0) Print
Expand All
Expand Minimize

SCardIntroduceReaderGroup function

The SCardIntroduceReaderGroup function introduces a reader group to the smart card subsystem. However, the reader group is not created until the group is specified when adding a reader to the smart card database.

Syntax


LONG WINAPI SCardIntroduceReaderGroup(
  _In_  SCARDCONTEXT hContext,
  _In_  LPCTSTR szGroupName
);

Parameters

hContext [in]

Supplies the handle that identifies the resource manager context. The resource manager context is set by a previous call to the SCardEstablishContext function. If this parameter is NULL, the scope of the resource manager is SCARD_SCOPE_SYSTEM.

szGroupName [in]

Supplies the display name to be assigned to the new reader group.

ValueMeaning
SCARD_ALL_READERS
TEXT("SCard$AllReaders\000")

Group used when no group name is provided when listing readers. Returns a list of all readers, regardless of what group or groups the readers are in.

SCARD_DEFAULT_READERS
TEXT("SCard$DefaultReaders\000")

Default group to which all readers are added when introduced into the system.

SCARD_LOCAL_READERS
TEXT("SCard$LocalReaders\000")

Unused legacy value. This is an internally managed group that cannot be modified by using any reader group APIs. It is intended to be used for enumeration only.

SCARD_SYSTEM_READERS
TEXT("SCard$SystemReaders\000")

Unused legacy value. This is an internally managed group that cannot be modified by using any reader group APIs. It is intended to be used for enumeration only.

 

Return value

This function returns different values depending on whether it succeeds or fails.

Return codeDescription
Success

SCARD_S_SUCCESS.

Failure

An error code. For more information, see Smart Card Return Values.

 

Remarks

The SCardIntroduceReaderGroup function is provided for PC/SC specification compatibility. Reader groups are not stored until a reader is added to the group.

The SCardIntroduceReaderGroup function is a database management function. For a description of other database management functions, see Smart Card Database Management Functions.

To remove a reader group, use SCardForgetReaderGroup.

Examples

The following example shows introducing a smart card reader group.


// Introduce the reader group.
// lReturn is of type LONG.
// hContext was set by a previous call to SCardEstablishContext.
lReturn = SCardIntroduceReaderGroup(hContext, 
                                    L"MyReaderGroup");
if ( SCARD_S_SUCCESS != lReturn )
    printf("Failed SCardIntroduceReaderGroup\n");


Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winscard.h

Library

Winscard.lib

DLL

Winscard.dll

Unicode and ANSI names

SCardIntroduceReaderGroupW (Unicode) and SCardIntroduceReaderGroupA (ANSI)

See also

SCardAddReaderToGroup
SCardEstablishContext
SCardIntroduceCardType
SCardIntroduceReader
SCardForgetReaderGroup

 

 

Community Additions

ADD
Show:
© 2015 Microsoft