Ok thanks for the clarification!
In my other post "Problem with new beidpkcs11.dll", I noticed when I put all the dlls as described above to my .net application the card reader still works (with the newly build beidpkcs11.dll). But when I delete all the dlls except beidpkcs11.dll. (installed latest middleware) Then the driver starts behaving weird and I start getting the following error. When I copy back the dlls from the sdk 4.0 it works again. So something must be changed in the session management or something...
Net.Sf.Pkcs11.TokenException: DEVICE_ERROR
bij Net.Sf.Pkcs11.Wrapper.Pkcs11Module.FindObjectsInit(UInt32 hSession, CK_ATTRIBUTE[] pTemplate)
bij Net.Sf.Pkcs11.Session.FindObjectsInit(P11Attribute[] attrs)
bij SunCoach.Client.Eid.Logic.EidReader.GetData(String type)
The only thing I do in the code is use the waitForEvent to check if a card is inserted or removed, to create .net events from this. Now I cannot reuse the Module or Session --> code recreates sessions when a session is already open.