Message 8 of 8
18 May 17 10:32
Join Date: 08 Sep 2005
Posts To This List: 10209
Share information between two UMDF driver instances
Are you using smclib or equivalent? None of the other smart card drivers query
global state to report a unit id. This should be something you can do without
Bent from my phone
From: email@example.com on behalf of Johnny Dakovo
Sent: Thursday, May 18, 2017 5:25:21 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Share information between two UMDF driver instances
However, this works if only readers are connected to my system, which are using
my driver. There is inconsistency when I connect a reader which uses my driver
and afterwards connect a reader which uses Windows native driver. The Windows
driver will not see my memory-mapped file I created and apply index 0 for its
I found out that, when the Windows driver is loaded it queries attributes
SCARD_ATTR_VENDOR_IFD_TYPE, SCARD_ATTR_VENDOR_IFD_TYPE and
SCARD_ATTR_DEVICE_UNIT from my driver (and from all other drivers currently
loaded). I guess this way the Windows driver can know which device units are
taken and apply a free one to its reader.
Does anybody how I can query these attributes from all loaded smart card reader
driver instances in my system?
2017-05-10 17:41 GMT+02:00 Johnny Dakovo
This works great, thank you.
2017-05-09 22:32 GMT+02:00 Tim Roberts
Johnny Dakovo wrote:
> I forgot to mention that I am using UMDF 1.11 because of backward
> compability reasons. Also, for each USB smartcard reader I connect, a
> separate WUDFHost.exe process is started (I can see them in the task
> manager). I already tried to use a global variable but it did not
> work, because I get different values when accessing it from different
> driver processes (which is logical). I am really wondering how
> Microsoft solved this.
One way would be to use a memory-mapped file. Well, the mapping object
gets a name, but the file does not need one. The technique is described
There are also ways to declare one of your DLL's sections to be "shared
data", which ends up being implemented in much the same way.
Tim Roberts, firstname.lastname@example.org
Providenza & Boekelheide, Inc.
NTDEV is sponsored by OSR
Visit the list online at:
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
To unsubscribe, visit the List Server section of OSR Online at
--- NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on
crash dump analysis, WDF, Windows internals and software drivers! Details at To
unsubscribe, visit the List Server section of OSR Online at