From 78c08327b17a4925aa7e90ec89e5bcbc63f2138d Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Sun, 4 Aug 2024 13:40:49 +0200 Subject: [PATCH] Doxygen: document dwCurrentState use for "\\?PnP?\Notification" --- src/winscard_clnt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/winscard_clnt.c b/src/winscard_clnt.c index 1e93677e..e7665da6 100644 --- a/src/winscard_clnt.c +++ b/src/winscard_clnt.c @@ -1586,9 +1586,13 @@ LONG SCardStatus(SCARDHANDLE hCard, LPSTR szReaderName, * be used to detect a card removal/insertion between two calls to * SCardGetStatusChange() * - * To wait for a reader event (reader added or removed) you may use the special - * reader name \c "\\?PnP?\Notification". If a reader event occurs the state of - * this reader will change and the bit \ref SCARD_STATE_CHANGED will be set. + * To wait for a reader event (reader added or removed) you may use the + * special reader name \c "\\?PnP?\Notification". If a reader event + * occurs the state of this reader will change and the bit \ref + * SCARD_STATE_CHANGED will be set. + * To detect a reader event betweeen 2 calls to SCardGetStatusChange() + * you can use the upper 16 bits of \p dwCurrentState. See https://blog.apdu.fr/posts/2024/08/improved-scardgetstatuschange-for-pnpnotification-special-reader/ + * * To cancel the ongoing call, use SCardCancel() with the same * \ref SCARDCONTEXT.