SCardRemoveReaderFromGroupW function (winscard.h)
The SCardRemoveReaderFromGroup function removes a reader from an existing reader group. This function has no effect on the reader.
Syntax
LONG SCardRemoveReaderFromGroupW(
[in] SCARDCONTEXT hContext,
[in] LPCWSTR szReaderName,
[in] LPCWSTR szGroupName
);
Parameters
[in] hContext
Handle that identifies the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext. This parameter cannot be NULL.
[in] szReaderName
Display name of the reader to be removed.
[in] szGroupName
Display name of the group from which the reader should be removed.
Return value
This function returns different values depending on whether it succeeds or fails.
Return code | Description |
---|---|
|
SCARD_S_SUCCESS. |
|
An error code. For more information, see Smart Card Return Values. |
Remarks
When the last reader is removed from a group, the group is automatically forgotten.
The SCardRemoveReaderFromGroup function is a database management function. For information about other database management functions, see Smart Card Database Management Functions.
To add a reader to a reader group, use SCardAddReaderToGroup.
Examples
The following example shows how to remove a reader from the group.
// Remove a reader from the group.
// lReturn is of type LONG.
// hContext was set by a previous call to SCardEstablishContext.
// The group is automatically forgotten if no readers remain in it.
lReturn = SCardRemoveReaderFromGroup(hContext,
L"MyReader",
L"MyReaderGroup");
if ( SCARD_S_SUCCESS != lReturn )
printf("Failed SCardRemoveReaderFromGroup\n");
Note
The winscard.h header defines SCardRemoveReaderFromGroup as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winscard.h |
Library | Winscard.lib |
DLL | Winscard.dll |