I am working on a minidriver project which can generate keypair in smartcard.
To generate a keypair from a test application I have to check if there is a keypair exist with the specified container name, if found I have to delete that.
To check if a container exist with the same name I have used NCryptOpenKey
Status = NCryptOpenKey(
hProvider,
&hKey,
wszContainerName,
0, // dwLegacyKeySpec
0 // dwFlags
);
It works perfectly and returns the key handle if there is a container available in smartcard with my minidriver.
But if there is no keypair with the same label in smart card it shows a dialog like this to select smart card
Is it natural to show the card selection dialog?
How to stop showing the card selection dialog from minidriver? NCryptOpenKey can simply return SCARD_E_NO_KEY_CONTAINER (0x80100030)
User contributions licensed under CC BY-SA 3.0