AGB  ·  Datenschutz  ·  Impressum  







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

CT - Api / Chipkarten

Ein Thema von skullcrusher · begonnen am 22. Okt 2003 · letzter Beitrag vom 28. Okt 2003
 
Colonel Chris

Registriert seit: 27. Okt 2003
7 Beiträge
 
#21

Re: CT - Api / Chipkarten

  Alt 27. Okt 2003, 22:51
Einmal die CT_data:

Delphi-Quellcode:
function CT_data( ctn: Word;
                  dad, sad: PByte;
                  lenc: Word;
                  command: PByte;
                  lenr: PWord;
                  response: PByte ): ShortInt;
begin
  Result := ERR_TRANS;
  if @Function_CTdata <> nil
  // now calling function from driver DLL
  then try
    Result := Function_CTdata(ctn,dad,sad,lenc,command,lenr,response);
  except
    Result := ERR_INCOMPATIBLE;
  end;
end;
Und der DLL-Aufruf zu Beginn der Hauptprozedur:
Delphi-Quellcode:
function CTAPI_Load(path: PChar): Integer;
begin
  Result := ERR_UNKNOWN;
  DLLHandle := LoadLibrary(path);
  if DLLHandle <> 0 then begin
    @Function_CTinit := GetProcAddress(DLLHandle, 'CT_init');
    @Function_CTdata := GetProcAddress(DLLHandle, 'CT_data');
    @Function_CTclose:= GetProcAddress(DLLHandle, 'CT_close');
    if (@Function_CTinit = nil) or (@Function_CTdata = nil)
                                or (@Function_CTclose = nil)
    then Result := ERR_INCOMPATIBLE;
  end
  else Result := ERR_LIBRARY;
end;
  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 02:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz