Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The SCardForgetReaderGroup function removes a previously introduced smart card reader group from the smart card subsystem. Although this function automatically clears all readers from the group, it does not affect the existence of the individual readers in the database.
LONG SCardForgetReaderGroupW(
[in] SCARDCONTEXT hContext,
[in] LPCWSTR szGroupName
);
[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] szGroupName
Display name of the reader group to be removed. System-defined reader groups cannot be removed from the database.
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. |
The SCardForgetReaderGroup function is a database management function. For more information on other database management functions, see Smart Card Database Management Functions.
The following example shows how to remove a reader group from the system. The example assumes that lReturn is an existing variable of type LONG, and that hContext is a valid handle to a resource manager context previously obtained from a call to the SCardEstablishContext function.
lReturn = SCardForgetReaderGroup(hContext,
L"MyReaderGroup");
if ( SCARD_S_SUCCESS != lReturn )
printf("Failed SCardForgetReaderGroup\n");
Note
The winscard.h header defines SCardForgetReaderGroup 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.
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today