I am signing a string through RSACryptoServiceProvider, using a digital certificate as key.
this process is done inside a COM dll, called from a delphi application.
in the choice of the certificate it is possible to pass the handle through the method:
scollection = X509Certificate2UI.SelectFromCollection (fcollection, "Available digital certificate (s)", "Select digital certificate", X509SelectionFlag.SingleSelection, ptr);
but in the authentication screen I could not do something similar, can anyone help me with this?
Assuming you mean you want a PIN or consent prompt parented to some HWND, you want something like
Note that this code assumes you have .NET 4.7 as the runtime, using the easy path described in https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/mitigation-cspparameters-parentwindowhandle-expects-an-hwnd.