AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TSmartCard für Delphi 2010

Ein Thema von hoika · begonnen am 3. Mai 2011 · letzter Beitrag vom 17. Apr 2013
 
Benutzerbild von Deep-Sea
Deep-Sea

Registriert seit: 17. Jan 2007
907 Beiträge
 
Delphi XE2 Professional
 
#2

AW: TSmartCard für Delphi 2010

  Alt 3. Mai 2011, 09:05
Und sonst funktioniert alles?!
Ich hab nämlich für D2009 u.a. noch folgende Funktionen angepasst:
Delphi-Quellcode:
function TSmartCard.ComandStr(const Cmd,DataIn: AnsiString): AnsiString;
begin
  if DataIn = 'then
  begin
    SetLength(Result, 255);
    SetLength(Result, Comand(Cmd,nil,0,@Result[1], Length(Result)));
  end else begin
    SetLength(Result, 255);
    SetLength(Result, Comand(Cmd,@DataIn[1],Length(DataIn),@Result[1], Length(Result)));
  end;
end;

function TSmartCard.Comand(const Cmd: AnsiString;
                            DataIn: Pointer; DataInLen: LongInt;
                            DataOut: Pointer; DataOutMax: LongInt
                            ): LongInt;
var R,L,M: LongInt; C: AnsiString;
begin
  try
    Result:=DataOutMax;
    if not FActive then Error('SmartCard component not activated');
    L:=Length(Cmd);
    if L = 0 then
      R:=FSCardComand(FTDevHandle,nil,L,
                      DataIn,DataInLen,DataOut,Result)
    else
      R:=FSCardComand(FTDevHandle,@Cmd[1],L,
                      DataIn,DataInLen,DataOut,Result);
    if R > 0 then begin
      Result:=0;
      C:=cmSystem+cmInfo+cmErrText;
      L:=Length(C);
      M:=0;
      SetLength(FError, 255);
      R:=Length(FError);
      FSCardComand(FTDevHandle,@C[1],L,nil,M,@FError[1],R);
      SetLength(FError, R);
      Error(FError);
    end;
  except
    Result:=0;
    if not (csDesigning in ComponentState) then raise;
  end;
end;
Vergleichs mal mit deinen Aber ob's daran liegt weiß ich natürlich nicht ...
Chris
Die Erfahrung ist ein strenger Schulmeister: Sie prüft uns, bevor sie uns lehrt.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:38 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz