How to use TCertificates_CertificateStores.FindAllAsync?

29 Views Asked by At

I'm using Delphi 12, how to use TCertificates_CertificateStores.FindAllAsync from WinAPI.Security.Cryptography.pas to return certificates from certificate stores? I have below codes, unfortunately I have no idea how to continue. Please kindly advise, thank you very much.

uses WinAPI.Security.Cryptography, WinAPI.WinRT.Utils;

procedure TForm1.Button1Click(Sender: TObject);
begin
  var Op := TCertificates_CertificateStores.FindAllAsync;
  Op.Completed := TTest.Create;
  Await(Op, AppProcessMessage);
  var R := Op.GetResults;
  //???
end;

procedure TForm1.AppProcessMessage;
begin
end;

procedure TTest.Invoke(asyncInfo:
    IAsyncOperation_1__IVectorView_1__Certificates_ICertificate; asyncStatus:
    AsyncStatus);
begin
end;
0

There are 0 best solutions below