{$APPTYPE CONSOLE}
program Sample1;
uses PCSCClasses,forms;
var
t:TResourceManager;
i,j:integer;
begin
// Create an instance of Resource Manager
t:=TResourceManager.Create(nil);
t.Connect(dsSystem);
try
if not t.IsPCSCOK then
writeln('PCSC is not running!')
else
begin
writeln('Determining Installed IFDs'#10#10'Reader groups (',t.Groups.Count,') and readers within groups:');
with t,Groups do
for i:= 0 to Count-1 do // Enumerate reader groups
with Items[i] do
begin
writeln (#10+GroupName+#10);
for j:= 0 to ReaderCount-1 do // Enumerate readers in the group
with Readers[ReaderNames[j]] do
begin
write(' '+ReaderName);
if connected then
writeln(' '+Atr.Hex) else writeln;
end;
end;
end;
writeln;
writeln('Press ENTER to close...');
readln;
finally
t.Free;
end;
end.