Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll

[es] :: Pascal / Delphi / Kylix :: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll

Strane: 1 2

[ Pregleda: 10003 | Odgovora: 38 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
195.252.121.*

Sajt: csdsgn.co.nr


Profil

icon Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll28.09.2010. u 18:09 - pre 115 meseci
Imam C file(CelikApi.h) koji treba konvertovati, pokusavao sam ali nista od toga ....

Ako je neko raspolozen za ovu temu i moj problem neka mi pomogne

Kod:


// CelikApi.h
//
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#ifndef WINAPI
#define WINAPI __stdcall
#endif

#ifndef EID_API
#define EID_API
#endif

//
// Constants
//

// Size of all UTF-8 fields in bytes

const int EID_MAX_DocRegNo = 9;
const int EID_MAX_IssuingDate = 10;
const int EID_MAX_ExpiryDate = 10;
const int EID_MAX_IssuingAuthority = 30;

const int EID_MAX_PersonalNumber = 13;
const int EID_MAX_Surname = 60;
const int EID_MAX_GivenName = 40;
const int EID_MAX_ParentGivenName = 25;
const int EID_MAX_Sex = 2;
const int EID_MAX_PlaceOfBirth = 25;
const int EID_MAX_StateOfBirth = 25;
const int EID_MAX_DateOfBirth = 10;
const int EID_MAX_CommunityOfBirth = 25;

const int EID_MAX_State = 3;
const int EID_MAX_Community = 25;
const int EID_MAX_Place = 25;
const int EID_MAX_Street = 36;
const int EID_MAX_HouseNumber = 5;
const int EID_MAX_HouseLetter = 2;
const int EID_MAX_Entrance = 3;
const int EID_MAX_Floor = 3;
const int EID_MAX_ApartmentNumber = 6;

const int EID_MAX_Portrait = 7700;

//
// Function return values
//

const int EID_OK = 0;
const int EID_E_GENERAL_ERROR = -1;
const int EID_E_INVALID_PARAMETER = -2;
const int EID_E_VERSION_NOT_SUPPORTED = -3;
const int EID_E_NOT_INITIALIZED = -4;
const int EID_E_UNABLE_TO_EXECUTE = -5;
const int EID_E_READER_ERROR = -6;
const int EID_E_CARD_MISSING = -7;
const int EID_E_CARD_UNKNOWN = -8;
const int EID_E_CARD_MISMATCH = -9;
const int EID_E_UNABLE_TO_OPEN_SESSION = -10;
const int EID_E_DATA_MISSING = -11;
const int EID_E_CARD_SECFORMAT_CHECK_ERROR = -12;
const int EID_E_SECFORMAT_CHECK_CERT_ERROR = -13;

//
// Structures
//

// NOTE: char arrays DO NOT have zero char at the end

typedef struct tagEID_DOCUMENT_DATA
{
char docRegNo[EID_MAX_DocRegNo];
int docRegNoSize;
char issuingDate[EID_MAX_IssuingDate];
int issuingDateSize;
char expiryDate[EID_MAX_ExpiryDate];
int expiryDateSize;
char issuingAuthority[EID_MAX_IssuingAuthority];
int issuingAuthoritySize;
} EID_DOCUMENT_DATA, *PEID_DOCUMENT_DATA;

typedef struct tagEID_FIXED_PERSONAL_DATA
{
char personalNumber[EID_MAX_PersonalNumber];
int personalNumberSize;
char surname[EID_MAX_Surname];
int surnameSize;
char givenName[EID_MAX_GivenName];
int givenNameSize;
char parentGivenName[EID_MAX_ParentGivenName];
int parentGivenNameSize;
char sex[EID_MAX_Sex];
int sexSize;
char placeOfBirth[EID_MAX_PlaceOfBirth];
int placeOfBirthSize;
char stateOfBirth[EID_MAX_StateOfBirth];
int stateOfBirthSize;
char dateOfBirth[EID_MAX_DateOfBirth];
int dateOfBirthSize;
char communityOfBirth[EID_MAX_CommunityOfBirth];
int communityOfBirthSize;
} EID_FIXED_PERSONAL_DATA, *PEID_FIXED_PERSONAL_DATA;

typedef struct tagEID_VARIABLE_PERSONAL_DATA
{
char state[EID_MAX_State];
int stateSize;
char community[EID_MAX_Community];
int communitySize;
char place[EID_MAX_Place];
int placeSize;
char street[EID_MAX_Street];
int streetSize;
char houseNumber[EID_MAX_HouseNumber];
int houseNumberSize;
char houseLetter[EID_MAX_HouseLetter];
int houseLetterSize;
char entrance[EID_MAX_Entrance];
int entranceSize;
char floor[EID_MAX_Floor];
int floorSize;
char apartmentNumber[EID_MAX_ApartmentNumber];
int apartmentNumberSize;
} EID_VARIABLE_PERSONAL_DATA, *PEID_VARIABLE_PERSONAL_DATA;

typedef struct tagEID_PORTRAIT
{
BYTE portrait[EID_MAX_Portrait];
int portraitSize;
} EID_PORTRAIT, *PEID_PORTRAIT;


//
// Functions
//
EID_API int WINAPI EidStartup(int nApiVersion);
EID_API int WINAPI EidCleanup();

EID_API int WINAPI EidBeginRead(LPCSTR szReader);
EID_API int WINAPI EidEndRead();

EID_API int WINAPI EidReadDocumentData(PEID_DOCUMENT_DATA pData);
EID_API int WINAPI EidReadFixedPersonalData(PEID_FIXED_PERSONAL_DATA pData);
EID_API int WINAPI EidReadVariablePersonalData(PEID_VARIABLE_PERSONAL_DATA pData);
EID_API int WINAPI EidReadPortrait(PEID_PORTRAIT pData);

EID_API int WINAPI EidReadDocumentDataP(char *pchDocRegNo, int *pnDocRegNoSize,
char *pchIssuingDate, int *pnIssuingDateSize,
char *pchExpiryDate, int *pnExpiryDateSize,
char *pchIssuingAuthority, int *pnIssuingAuthoritySize);

EID_API int WINAPI EidReadFixedPersonalDataP(char *pchPersonalNumber, int *pnPersonalNumberSize,
char *pchSurname, int *pnSurnameSize,
char *pchGivenName, int *pnGivenNameSize,
char *pchParentGivenName, int *pnParentGivenNameSize,
char *pchSex, int *pnSexSize,
char *pchPlaceOfBirth, int *pnPlaceOfBirthSize,
char *pchStateOfBirth, int *pnStateOfBirthSize,
char *pchDateOfBirth, int *pnDateOfBirthSize,
char *pchCommunityOfBirth, int *pnCommunityOfBirthSize);

EID_API int WINAPI EidReadVariablePersonalDataP(char *pchState, int *pnStateSize,
char *pchCommunity, int *pnCommunitySize,
char *pchPlace, int *pnPlaceSize,
char *pchStreet, int *pnStreetSize,
char *pchHouseNumber, int *pnHouseNumberSize,
char *pchHouseLetter, int *pnHouseLetterSize,
char *pchEntrance, int *pnEntranceSize,
char *pchFloor, int *pnFloorSize,
char *pchApartmentNumber, int *pnApartmentNumberSize);

EID_API int WINAPI EidReadPortraitP(BYTE *pchPortrait, int *pnPortraitSize);


#ifdef __cplusplus
};
#endif
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll28.09.2010. u 18:26 - pre 115 meseci
> Imam C file(CelikApi.h) koji treba konvertovati, pokusavao sam ali nista od toga ....

Iskoristi neki od postojećih alata za konverziju.

http://rvelthuis.de/programs/convertpack.html
http://www.drbob42.com/headconv/index.htm
http://c2pas.sourceforge.net/

 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
195.252.121.*

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll28.09.2010. u 21:09 - pre 115 meseci
Hvala, nisam ovako nesto radio, voleo bih neko od iskusnijih programera da prover ovaj kodi...

Unapred hvala jos jednom



unit CELIKAPI;
{**************************************************************************}
{ }
{ This C DLL header file first (automatic) conversion generated by: }
{ HeadConv 4.0 (c) 2000 by Bob Swart (aka Dr.Bob - www.drbob42.com) }
{ Final Delphi-Jedi (Darth) command-line units edition }
{ }
{ Generated Date: 28.9.2010 }
{ Generated Time: 20:02:40 }
{ }
{**************************************************************************}

interface
uses
{$IFDEF WIN32}
Windows;
{$ELSE}
Wintypes, WinProcs;
{$ENDIF}


{=> c:\documents and settings\korisnik\desktop\CELIKAPI.H <=}

{ #pragma once }

{$IFDEF __cplusplus}
{$ENDIF}

{$IFNDEF WINAPI}

{$ENDIF}

{$IFNDEF EID_API}
{$DEFINE EID_API}
{$ENDIF}



const EID_MAX_DocRegNo = 9;
const EID_MAX_IssuingDate = 10;
const EID_MAX_ExpiryDate = 10;
const EID_MAX_IssuingAuthority = 30;

const EID_MAX_PersonalNumber = 13;
const EID_MAX_Surname = 60;
const EID_MAX_GivenName = 40;
const EID_MAX_ParentGivenName = 25;
const EID_MAX_Sex = 2;
const EID_MAX_PlaceOfBirth = 25;
const EID_MAX_StateOfBirth = 25;
const EID_MAX_DateOfBirth = 10;
const EID_MAX_CommunityOfBirth = 25;

const EID_MAX_State = 3;
const EID_MAX_Community = 25;
const EID_MAX_Place = 25;
const EID_MAX_Street = 36;
const EID_MAX_HouseNumber = 5;
const EID_MAX_HouseLetter = 2;
const EID_MAX_Entrance = 3;
const EID_MAX_Floor = 3;
const EID_MAX_ApartmentNumber = 6;

const EID_MAX_Portrait = 7700;



const EID_OK = 0;
const EID_E_GENERAL_ERROR = -1;
const EID_E_INVALID_PARAMETER = -2;
const EID_E_VERSION_NOT_SUPPORTED = -3;
const EID_E_NOT_INITIALIZED = -4;
const EID_E_UNABLE_TO_EXECUTE = -5;
const EID_E_READER_ERROR = -6;
const EID_E_CARD_MISSING = -7;
const EID_E_CARD_UNKNOWN = -8;
const EID_E_CARD_MISMATCH = -9;
const EID_E_UNABLE_TO_OPEN_SESSION = -10;
const EID_E_DATA_MISSING = -11;
const EID_E_CARD_SECFORMAT_CHECK_ERROR = -12;
const EID_E_SECFORMAT_CHECK_CERT_ERROR = -13;










type
EID_DOCUMENT_DATA = record
docRegNo: Array[0..EID_MAX_DocRegNo-1] of Char;
docRegNoSize: Integer;
issuingDate: Array[0..EID_MAX_IssuingDate-1] of Char;
issuingDateSize: Integer;
expiryDate: Array[0..EID_MAX_ExpiryDate-1] of Char;
expiryDateSize: Integer;
issuingAuthority: Array[0..EID_MAX_IssuingAuthority-1] of Char;
issuingAuthoritySize: Integer;
end {tagEID_DOCUMENT_DATA};

type
EID_FIXED_PERSONAL_DATA = record
personalNumber: Array[0..EID_MAX_PersonalNumber-1] of Integer;
personalNumberSize: Integer;
surname: Array[0..EID_MAX_Surname-1] of Char;
surnameSize: Integer;
givenName: Array[0..EID_MAX_GivenName-1] of Char;
givenNameSize: Integer;
parentGivenName: Array[0..EID_MAX_ParentGivenName-1] of Char;
parentGivenNameSize: Integer;
sex: Array[0..EID_MAX_Sex-1] of Char;
sexSize: Integer;
placeOfBirth: Array[0..EID_MAX_PlaceOfBirth-1] of Char;
placeOfBirthSize: Integer;
stateOfBirth: Array[0..EID_MAX_StateOfBirth-1] of Char;
stateOfBirthSize: Integer;
dateOfBirth: Array[0..EID_MAX_DateOfBirth-1] of Char;
dateOfBirthSize: Integer;
communityOfBirth: Array[0..EID_MAX_CommunityOfBirth-1] of Char;
communityOfBirthSize: Integer;
end {tagEID_FIXED_PERSONAL_DATA};

type
EID_VARIABLE_PERSONAL_DATA = record
state: Array[0..EID_MAX_State-1] of Char;
stateSize: Integer;
community: Array[0..EID_MAX_Community-1] of Char;
communitySize: Integer;
place: Array[0..EID_MAX_Place-1] of Char;
placeSize: Integer;
street: Array[0..EID_MAX_Street-1] of Char;
streetSize: Integer;
houseNumber: Array[0..EID_MAX_HouseNumber-1] of Char;
houseNumberSize: Integer;
houseLetter: Array[0..EID_MAX_HouseLetter-1] of Char;
houseLetterSize: Integer;
entrance: Array[0..EID_MAX_Entrance-1] of Char;
entranceSize: Integer;
floor: Array[0..EID_MAX_Floor-1] of Char;
floorSize: Integer;
apartmentNumber: Array[0..EID_MAX_ApartmentNumber-1] of Char;
apartmentNumberSize: Integer;
end {tagEID_VARIABLE_PERSONAL_DATA};

type
EID_PORTRAIT = record
portrait: Array[0..EID_MAX_Portrait-1] of BYTE;
portraitSize: Integer;
end {tagEID_PORTRAIT};


{/// }
{/// Functions }
{/// }
var
EidStartup: function(nApiVersion: Integer):integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidCleanup: function: integer;{$IFDEF WIN32} stdcall {$ENDIF};

var
EidBeginRead: function(szReader: string):integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidEndRead: function: integer; {$IFDEF WIN32} stdcall {$ENDIF};

var
EidReadDocumentData: function(var pData: EID_DOCUMENT_DATA):integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidReadFixedPersonalData: function(var pData: EID_FIXED_PERSONAL_DATA): integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidReadVariablePersonalData: function(var pData: EID_VARIABLE_PERSONAL_DATA): integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidReadPortrait: function(var pData: EID_PORTRAIT): integer; {$IFDEF WIN32} stdcall {$ENDIF};

var
EidReadDocumentDataP: function(pchDocRegNo: PChar;
var pnDocRegNoSize: Integer;
pchIssuingDate: PChar;
var pnIssuingDateSize: Integer;
pchExpiryDate: PChar;
var pnExpiryDateSize: Integer;
pchIssuingAuthority: PChar;
var pnIssuingAuthoritySize: Integer): integer; {$IFDEF WIN32} stdcall {$ENDIF};

var
EidReadFixedPersonalDataP: function(pchPersonalNumber: PChar;
var pnPersonalNumberSize: Integer;
pchSurname: PChar;
var pnSurnameSize: Integer;
pchGivenName: PChar;
var pnGivenNameSize: Integer;
pchParentGivenName: PChar;
var pnParentGivenNameSize: Integer;
pchSex: PChar;
var pnSexSize: Integer;
_11: Char):integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidReadVariablePersonalDataP: function(pchState: PChar;
var pnStateSize: Integer;
pchCommunity: PChar;
var pnCommunitySize: Integer;
pchPlace: PChar;
var pnPlaceSize: Integer;
pchStreet: PChar;
var pnStreetSize: Integer;
pchHouseNumber: PChar;
var pnHouseNumberSize: Integer;
pchHouseLetter: PChar;
var _12: Integer): integer; {$IFDEF WIN32} stdcall {$ENDIF};
var
EidReadPortraitP: function(var pchPortrait: BYTE;
var pnPortraitSize: Integer): integer; {$IFDEF WIN32} stdcall {$ENDIF};

procedure LoadDLL;
procedure NewExit; far;

{$IFDEF __cplusplus}
{$ENDIF}

var
DLLLoaded: Boolean { is DLL (dynamically) loaded already? }
{$IFDEF WIN32} = False; {$ENDIF}

implementation

var
SaveExit: pointer;
DLLHandle: THandle;
{$IFNDEF MSDOS}
ErrorMode: Integer;
{$ENDIF}

procedure NewExit; far;
begin
ExitProc := SaveExit;
FreeLibrary(DLLHandle)
end {NewExit};

procedure LoadDLL;
begin
if DLLLoaded then Exit;
{$IFNDEF MSDOS}
ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});
{$ENDIF}
DLLHandle := LoadLibrary('CelikApi.dll');
if DLLHandle >= 32 then
begin
DLLLoaded := True;
SaveExit := ExitProc;
ExitProc := @NewExit;
@EidStartup := GetProcAddress(DLLHandle,'EidStartup');
{$IFDEF WIN32}
Assert(@EidStartup <> nil);
{$ENDIF}
@EidCleanup := GetProcAddress(DLLHandle,'EidCleanup');
{$IFDEF WIN32}
Assert(@EidCleanup <> nil);
{$ENDIF}
@EidBeginRead := GetProcAddress(DLLHandle,'EidBeginRead');
{$IFDEF WIN32}
Assert(@EidBeginRead <> nil);
{$ENDIF}
@EidEndRead := GetProcAddress(DLLHandle,'EidEndRead');
{$IFDEF WIN32}
Assert(@EidEndRead <> nil);
{$ENDIF}
@EidReadDocumentData := GetProcAddress(DLLHandle,'EidReadDocumentData');
{$IFDEF WIN32}
Assert(@EidReadDocumentData <> nil);
{$ENDIF}
@EidReadFixedPersonalData := GetProcAddress(DLLHandle,'EidReadFixedPersonalData');
{$IFDEF WIN32}
Assert(@EidReadFixedPersonalData <> nil);
{$ENDIF}
@EidReadVariablePersonalData := GetProcAddress(DLLHandle,'EidReadVariablePersonalData');
{$IFDEF WIN32}
Assert(@EidReadVariablePersonalData <> nil);
{$ENDIF}
@EidReadPortrait := GetProcAddress(DLLHandle,'EidReadPortrait');
{$IFDEF WIN32}
Assert(@EidReadPortrait <> nil);
{$ENDIF}
@EidReadDocumentDataP := GetProcAddress(DLLHandle,'EidReadDocumentDataP');
{$IFDEF WIN32}
Assert(@EidReadDocumentDataP <> nil);
{$ENDIF}
@EidReadFixedPersonalDataP := GetProcAddress(DLLHandle,'EidReadFixedPersonalDataP');
{$IFDEF WIN32}
Assert(@EidReadFixedPersonalDataP <> nil);
{$ENDIF}
@EidReadVariablePersonalDataP := GetProcAddress(DLLHandle,'EidReadVariablePersonalDataP');
{$IFDEF WIN32}
Assert(@EidReadVariablePersonalDataP <> nil);
{$ENDIF}
@EidReadPortraitP := GetProcAddress(DLLHandle,'EidReadPortraitP');
{$IFDEF WIN32}
Assert(@EidReadPortraitP <> nil);
{$ENDIF}
end
else
begin
DLLLoaded := False;
{ Error: CELIKAPI.DLL could not be loaded !! }
end;
{$IFNDEF MSDOS}
SetErrorMode(ErrorMode)
{$ENDIF}
end {LoadDLL};

begin
LoadDLL;
end.



 
Odgovor na temu

dogriz
Sombor

Član broj: 29744
Poruke: 259
*.dynamic.sbb.rs.

Sajt: dogriz.blogspot.com


+6 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll29.09.2010. u 07:09 - pre 115 meseci
I ja sam ovo pokušao ali bez uspeha. Pokušao sam i sa alatima za konverziju, ali nisam dobio zadovoljavajuće rezultate. Nisam uspeo ni sa drugim API-jima za čitače kartica.
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll29.09.2010. u 12:54 - pre 115 meseci
> Hvala, nisam ovako nesto radio, voleo bih neko od iskusnijih programera da prover ovaj kodi...

Za proveru bi trebalo probati a za to nema mogućnosti. Pre svega imaš užasno formatiranje koje otežava pregled i imaš dosta kondicionih direktiva (IFDEF WIN32).
Mogu ti reći da se npr:
char *Variable prevodi kao Variable: PChar
int *pnGivenNameSize prevodi kao Variable: PInteger ili var Variable: Integer, što i jeste kod tebe ali nisam svuda gledao. Trebaš proveriti da li recorde trebaš deklarisati sa packed record direktivom ili ne, to zavisi od alingmenta C kompajlera. Probaj prvo sa ovakvim pa ako ne ide probaj sa packed.
 
Odgovor na temu

dogriz
Sombor

Član broj: 29744
Poruke: 259
*.dynamic.sbb.rs.

Sajt: dogriz.blogspot.com


+6 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll30.09.2010. u 06:53 - pre 115 meseci
Originalni izvor se nalazi na: http://www.mup.gov.rs/cms_lat/dokumenta.nsf/licna-karta-aplikacija.h, a drBob-ov konvertor uradi nešto ovako (što inače ne funkcioniše):
Code (delphi):

unit CELIKAPI;

interface
uses
{$IFDEF WIN32}
  Windows;
{$ELSE}
  Wintypes, WinProcs;
{$ENDIF}


{/// CelikApi.h }
{/// }
{ #pragma once }

{$IFDEF __cplusplus}
{$ENDIF}

{$IFNDEF WINAPI}
const
  WINAPI = __stdcall;
{$ENDIF}

{$IFNDEF EID_API}
{$DEFINE EID_API}
{$ENDIF}

{/// }
{/// Constants }
{/// }

{/// Size of all UTF-8 fields in bytes }





{/// }
{/// Function return values }
{/// }


{/// }
{/// Structures }
{/// }

{/// NOTE: char arrays DO NOT have zero char at the end }

type
  tagEID_DOCUMENT_DATA = record
    docRegNo: Array[0..EID_MAX_DocRegNo-1] of Char;
    docRegNoSize: Integer;
    issuingDate: Array[0..EID_MAX_IssuingDate-1] of Char;
    issuingDateSize: Integer;
    expiryDate: Array[0..EID_MAX_ExpiryDate-1] of Char;
    expiryDateSize: Integer;
    issuingAuthority: Array[0..EID_MAX_IssuingAuthority-1] of Char;
    issuingAuthoritySize: Integer;
  end {tagEID_DOCUMENT_DATA};

type
  tagEID_FIXED_PERSONAL_DATA = record
    personalNumber: Array[0..EID_MAX_PersonalNumber-1] of Integer;
    personalNumberSize: Integer;
    surname: Array[0..EID_MAX_Surname-1] of Char;
    surnameSize: Integer;
    givenName: Array[0..EID_MAX_GivenName-1] of Char;
    givenNameSize: Integer;
    parentGivenName: Array[0..EID_MAX_ParentGivenName-1] of Char;
    parentGivenNameSize: Integer;
    sex: Array[0..EID_MAX_Sex-1] of Char;
    sexSize: Integer;
    placeOfBirth: Array[0..EID_MAX_PlaceOfBirth-1] of Char;
    placeOfBirthSize: Integer;
    stateOfBirth: Array[0..EID_MAX_StateOfBirth-1] of Char;
    stateOfBirthSize: Integer;
    dateOfBirth: Array[0..EID_MAX_DateOfBirth-1] of Char;
    dateOfBirthSize: Integer;
    communityOfBirth: Array[0..EID_MAX_CommunityOfBirth-1] of Char;
    communityOfBirthSize: Integer;
  end {tagEID_FIXED_PERSONAL_DATA};

type
  tagEID_VARIABLE_PERSONAL_DATA = record
    state: Array[0..EID_MAX_State-1] of Char;
    stateSize: Integer;
    community: Array[0..EID_MAX_Community-1] of Char;
    communitySize: Integer;
    place: Array[0..EID_MAX_Place-1] of Char;
    placeSize: Integer;
    street: Array[0..EID_MAX_Street-1] of Char;
    streetSize: Integer;
    houseNumber: Array[0..EID_MAX_HouseNumber-1] of Char;
    houseNumberSize: Integer;
    houseLetter: Array[0..EID_MAX_HouseLetter-1] of Char;
    houseLetterSize: Integer;
    entrance: Array[0..EID_MAX_Entrance-1] of Char;
    entranceSize: Integer;
    floor: Array[0..EID_MAX_Floor-1] of Char;
    floorSize: Integer;
    apartmentNumber: Array[0..EID_MAX_ApartmentNumber-1] of Char;
    apartmentNumberSize: Integer;
  end {tagEID_VARIABLE_PERSONAL_DATA};

type
  tagEID_PORTRAIT = record
    portrait: Array[0..EID_MAX_Portrait-1] of BYTE;
    portraitSize: Integer;
  end {tagEID_PORTRAIT};


{/// }
{/// Functions }
{/// }
var
  EidStartup: function(nApiVersion: Integer): EID_API {$IFDEF WIN32} stdcall {$ENDIF};
var
  EidCleanup: function: EID_API {$IFDEF WIN32} stdcall {$ENDIF};

var
  EidBeginRead: function(var szReader: CSTR): EID_API {$IFDEF WIN32} stdcall {$ENDIF};
var
  EidEndRead: function: EID_API {$IFDEF WIN32} stdcall {$ENDIF};

var
  EidReadDocumentData: function(var pData: EID_DOCUMENT_DATA): EID_API {$IFDEF WIN32} stdcall {$ENDIF};
var
  EidReadFixedPersonalData: function(var pData: EID_FIXED_PERSONAL_DATA): EID_API {$IFDEF WIN32} stdcall {$ENDIF};
var
  EidReadVariablePersonalData: function(var pData: EID_VARIABLE_PERSONAL_DATA): EID_API {$IFDEF WIN32} stdcall {$ENDIF};
var
  EidReadPortrait: function(var pData: EID_PORTRAIT): EID_API {$IFDEF WIN32} stdcall {$ENDIF};


{$IFDEF __cplusplus}
{$ENDIF}

var
  DLLLoaded: Boolean { is DLL (dynamically) loaded already? }
    {$IFDEF WIN32} = False; {$ENDIF}

implementation

var
  SaveExit: pointer;
  DLLHandle: THandle;
{$IFNDEF MSDOS}
  ErrorMode: Integer;
{$ENDIF}

  procedure NewExit; far;
  begin
    ExitProc := SaveExit;
    FreeLibrary(DLLHandle)
  end {NewExit};

procedure LoadDLL;
begin
  if DLLLoaded then Exit;
{$IFNDEF MSDOS}
  ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});
{$ENDIF}
  DLLHandle := LoadLibrary('CELIKAPI.DLL');
  if DLLHandle >= 32 then
  begin
    DLLLoaded := True;
    SaveExit := ExitProc;
    ExitProc := @NewExit;
    @EidStartup := GetProcAddress(DLLHandle,'EidStartup');
  {$IFDEF WIN32}
    Assert(@EidStartup <> nil);
  {$ENDIF}
    @EidCleanup := GetProcAddress(DLLHandle,'EidCleanup');
  {$IFDEF WIN32}
    Assert(@EidCleanup <> nil);
  {$ENDIF}
    @EidBeginRead := GetProcAddress(DLLHandle,'EidBeginRead');
  {$IFDEF WIN32}
    Assert(@EidBeginRead <> nil);
  {$ENDIF}
    @EidEndRead := GetProcAddress(DLLHandle,'EidEndRead');
  {$IFDEF WIN32}
    Assert(@EidEndRead <> nil);
  {$ENDIF}
    @EidReadDocumentData := GetProcAddress(DLLHandle,'EidReadDocumentData');
  {$IFDEF WIN32}
    Assert(@EidReadDocumentData <> nil);
  {$ENDIF}
    @EidReadFixedPersonalData := GetProcAddress(DLLHandle,'EidReadFixedPersonalData');
  {$IFDEF WIN32}
    Assert(@EidReadFixedPersonalData <> nil);
  {$ENDIF}
    @EidReadVariablePersonalData := GetProcAddress(DLLHandle,'EidReadVariablePersonalData');
  {$IFDEF WIN32}
    Assert(@EidReadVariablePersonalData <> nil);
  {$ENDIF}
    @EidReadPortrait := GetProcAddress(DLLHandle,'EidReadPortrait');
  {$IFDEF WIN32}
    Assert(@EidReadPortrait <> nil);
  {$ENDIF}
  end
  else
  begin
    DLLLoaded := False;
    { Error: CELIKAPI.DLL could not be loaded !! }
  end;
{$IFNDEF MSDOS}
  SetErrorMode(ErrorMode)
{$ENDIF}
end {LoadDLL};

begin
  LoadDLL;
end.
 
 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
*.dynamic.isp.telekom.rs.

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll30.09.2010. u 12:23 - pre 115 meseci
Sta da se radi izlozio sam problem, hteo sam samostalno da odradim da nikoga ne zamaram ali nista od toga....

Probao sam i ja ali nista, valjda ce neko videti ovu temu i biti u domenu da pomogne koliko moze u svakom slucaju cekam neki odgovor koji ce resiti misteriju.
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll30.09.2010. u 16:18 - pre 115 meseci
> Originalni izvor se nalazi na: http://www.mup.gov.rs/cms_lat/...a.nsf/licna-karta-aplikacija.h, a drBob-ov konvertor uradi nešto ovako (što inače ne funkcioniše):

Pa hajde dajte tačan opis šta ne funkcioniše, da li ste probali sa drugim konvertorima, da li ste ručno proverili sve deklaracije, da li ste proverili alingment (treba li packed record), koju grešku dobijate? Ja nemam čitač ni taj celik pa ne mogu licno probati.
 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
195.252.121.*

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll30.09.2010. u 18:30 - pre 115 meseci
Funkcije koje sam uspeo da resim su :



Greske:

const EID_OK = 0;
const EID_E_GENERAL_ERROR = -1;
const EID_E_INVALID_PARAMETER = -2;
const EID_E_VERSION_NOT_SUPPORTED = -3;
const EID_E_NOT_INITIALIZED = -4;
const EID_E_UNABLE_TO_EXECUTE = -5;
const EID_E_READER_ERROR = -6;
const EID_E_CARD_MISSING = -7;
const EID_E_CARD_UNKNOWN = -8;
const EID_E_CARD_MISMATCH = -9;
const EID_E_UNABLE_TO_OPEN_SESSION = -10;
const EID_E_DATA_MISSING = -11;
const EID_E_CARD_SECFORMAT_CHECK_ERROR = -12;
const EID_E_SECFORMAT_CHECK_CERT_ERROR = -13;


//Api version je (1) = ok
function(nApiVersion: Integer):integer;

//Ok
function EidCleanup: integer;

//Saljem prazan string = ok
function(szReader: string):integer;

//Ok
function EidEndRead: integer;

/////////////////////////////////////
Ovde mi je najveci problem, kako da preuzmem podatke
a imam ovu funkciju

function EidReadDocumentData(var pData: EID_DOCUMENT_DATA):integer;;

a ona ima veze sa:

type
EID_DOCUMENT_DATA = record
docRegNo: Array[0..EID_MAX_DocRegNo-1] of Char;
docRegNoSize: Integer;
issuingDate: Array[0..EID_MAX_IssuingDate-1] of Char;
issuingDateSize: Integer;
expiryDate: Array[0..EID_MAX_ExpiryDate-1] of Char;
expiryDateSize: Integer;
issuingAuthority: Array[0..EID_MAX_IssuingAuthority-1] of Char;
issuingAuthoritySize: Integer;
end {tagEID_DOCUMENT_DATA};





 
Odgovor na temu

dogriz
Sombor

Član broj: 29744
Poruke: 259
*.dynamic.sbb.rs.

Sajt: dogriz.blogspot.com


+6 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll01.10.2010. u 08:13 - pre 115 meseci
Primer test projekta sa porukama o greškama (WinXP i D2006).
Prikačeni fajlovi
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll03.10.2010. u 17:17 - pre 115 meseci
Ovako bi trebalo da izgleda.

Code:


unit CelikApi;

interface

uses
  Windows;

const
  EID_MAX_DocRegNo = 9;
  EID_MAX_IssuingDate = 10;
  EID_MAX_ExpiryDate = 10;
  EID_MAX_IssuingAuthority = 30;

  EID_MAX_PersonalNumber = 13;
  EID_MAX_Surname = 60;
  EID_MAX_GivenName = 40;
  EID_MAX_ParentGivenName = 25;
  EID_MAX_Sex = 2;
  EID_MAX_PlaceOfBirth = 25;
  EID_MAX_StateOfBirth = 25;
  EID_MAX_DateOfBirth = 10;
  EID_MAX_CommunityOfBirth = 25;

  EID_MAX_State = 3;
  EID_MAX_Community = 25;
  EID_MAX_Place = 25;
  EID_MAX_Street = 36;
  EID_MAX_HouseNumber = 5;
  EID_MAX_HouseLetter = 2;
  EID_MAX_Entrance = 3;
  EID_MAX_Floor = 3;
  EID_MAX_ApartmentNumber = 6;

  EID_MAX_Portrait = 7700;

  EID_OK = 0;
  EID_E_GENERAL_ERROR = -1;
  EID_E_INVALID_PARAMETER = -2;
  EID_E_VERSION_NOT_SUPPORTED = -3;
  EID_E_NOT_INITIALIZED = -4;
  EID_E_UNABLE_TO_EXECUTE = -5;
  EID_E_READER_ERROR = -6;
  EID_E_CARD_MISSING = -7;
  EID_E_CARD_UNKNOWN = -8;
  EID_E_CARD_MISMATCH = -9;
  EID_E_UNABLE_TO_OPEN_SESSION = -10;
  EID_E_DATA_MISSING = -11;
  EID_E_CARD_SECFORMAT_CHECK_ERROR = -12;
  EID_E_SECFORMAT_CHECK_CERT_ERROR = -13;

type
  tagEID_DOCUMENT_DATA = record
    docRegNo: array[0..EID_MAX_DocRegNo - 1] of Char;
    docRegNoSize: Integer;
    issuingDate: array[0..EID_MAX_IssuingDate - 1] of Char;
    issuingDateSize: Integer;
    expiryDate: array[0..EID_MAX_ExpiryDate - 1] of Char;
    expiryDateSize: Integer;
    issuingAuthority: array[0..EID_MAX_IssuingAuthority - 1] of Char;
    issuingAuthoritySize: Integer;
  end {tagEID_DOCUMENT_DATA};

 EID_DOCUMENT_DATA = tagEID_DOCUMENT_DATA;
 PEID_DOCUMENT_DATA = ^ tagEID_DOCUMENT_DATA;

type
  tagEID_FIXED_PERSONAL_DATA = record
    personalNumber: array[0..EID_MAX_PersonalNumber - 1] of Char;
    personalNumberSize: Integer;
    surname: array[0..EID_MAX_Surname - 1] of Char;
    surnameSize: Integer;
    givenName: array[0..EID_MAX_GivenName - 1] of Char;
    givenNameSize: Integer;
    parentGivenName: array[0..EID_MAX_ParentGivenName - 1] of Char;
    parentGivenNameSize: Integer;
    sex: array[0..EID_MAX_Sex - 1] of Char;
    sexSize: Integer;
    placeOfBirth: array[0..EID_MAX_PlaceOfBirth - 1] of Char;
    placeOfBirthSize: Integer;
    stateOfBirth: array[0..EID_MAX_StateOfBirth - 1] of Char;
    stateOfBirthSize: Integer;
    dateOfBirth: array[0..EID_MAX_DateOfBirth - 1] of Char;
    dateOfBirthSize: Integer;
    communityOfBirth: array[0..EID_MAX_CommunityOfBirth - 1] of Char;
    communityOfBirthSize: Integer;
  end {tagEID_FIXED_PERSONAL_DATA};

 EID_FIXED_PERSONAL_DATA = tagEID_FIXED_PERSONAL_DATA;
 PEID_FIXED_PERSONAL_DATA = ^tagEID_FIXED_PERSONAL_DATA;

type
  tagEID_VARIABLE_PERSONAL_DATA = record
    state: array[0..EID_MAX_State - 1] of Char;
    stateSize: Integer;
    community: array[0..EID_MAX_Community - 1] of Char;
    communitySize: Integer;
    place: array[0..EID_MAX_Place - 1] of Char;
    placeSize: Integer;
    street: array[0..EID_MAX_Street - 1] of Char;
    streetSize: Integer;
    houseNumber: array[0..EID_MAX_HouseNumber - 1] of Char;
    houseNumberSize: Integer;
    houseLetter: array[0..EID_MAX_HouseLetter - 1] of Char;
    houseLetterSize: Integer;
    entrance: array[0..EID_MAX_Entrance - 1] of Char;
    entranceSize: Integer;
    floor: array[0..EID_MAX_Floor - 1] of Char;
    floorSize: Integer;
    apartmentNumber: array[0..EID_MAX_ApartmentNumber - 1] of Char;
    apartmentNumberSize: Integer;
  end {tagEID_VARIABLE_PERSONAL_DATA};

  EID_VARIABLE_PERSONAL_DATA = tagEID_VARIABLE_PERSONAL_DATA;
  PEID_VARIABLE_PERSONAL_DATA = ^tagEID_VARIABLE_PERSONAL_DATA;

type
  tagEID_PORTRAIT = record
    portrait: array[0..EID_MAX_Portrait - 1] of BYTE;
    portraitSize: Integer;
  end {tagEID_PORTRAIT};

  EID_PORTRAIT = tagEID_PORTRAIT;
  PEID_PORTRAIT = ^tagEID_PORTRAIT;

var
  EidStartup: function(nApiVersion: Integer): Integer; stdcall;
  EidCleanup: function: Integer; stdcall;

  EidBeginRead: function(szReader: LPCSTR): Integer; stdcall;
  EidEndRead: function: Integer; stdcall;

  EidReadDocumentData: function(pData: PEID_DOCUMENT_DATA): Integer; stdcall;
  EidReadFixedPersonalData: function(pData: PEID_FIXED_PERSONAL_DATA): Integer; stdcall;
  EidReadVariablePersonalData: function(pData: PEID_VARIABLE_PERSONAL_DATA): Integer; stdcall;
  EidReadPortrait: function(pData: PEID_PORTRAIT): Integer; stdcall;

implementation

var
  DLLHandle: HMODULE;

procedure LoadDLL;
begin
  DLLHandle := LoadLibrary('CelikApi.dll');

  if DLLHandle <> 0 then
  begin
    @EidStartup := GetProcAddress(DLLHandle, 'EidStartup');
    @EidCleanup := GetProcAddress(DLLHandle, 'EidCleanup');
    @EidBeginRead := GetProcAddress(DLLHandle, 'EidBeginRead');
    @EidEndRead := GetProcAddress(DLLHandle, 'EidEndRead');
    @EidReadDocumentData := GetProcAddress(DLLHandle, 'EidReadDocumentData');
    @EidReadFixedPersonalData := GetProcAddress(DLLHandle, 'EidReadFixedPersonalData');
    @EidReadVariablePersonalData := GetProcAddress(DLLHandle, 'EidReadVariablePersonalData');
    @EidReadPortrait := GetProcAddress(DLLHandle, 'EidReadPortrait');
  end;
end;

initialization
  LoadDLL;

finalization
  if DLLHandle <> 0 then
    FreeLibrary(DLLHandle)

end.



[Ovu poruku je menjao savkic dana 05.10.2010. u 16:53 GMT+1]
 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
195.252.121.*

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll03.10.2010. u 19:16 - pre 115 meseci
Igore hvala, funkcionise ali imam problema sa packed record.

Kako ova funkcija treba da se upotrebi i da vrati rezultat ?



type
TagEID_DOCUMENT_DATA = record
docRegNo: array[0..EID_MAX_DocRegNo - 1] of Char;
docRegNoSize: Integer;
issuingDate: array[0..EID_MAX_IssuingDate - 1] of Char;
issuingDateSize: Integer;
expiryDate: array[0..EID_MAX_ExpiryDate - 1] of Char;
expiryDateSize: Integer;
issuingAuthority: array[0..EID_MAX_IssuingAuthority - 1] of Char;
issuingAuthoritySize: Integer;
end {tagEID_DOCUMENT_DATA};

EID_DOCUMENT_DATA = tagEID_DOCUMENT_DATA;
PEID_DOCUMENT_DATA = ^ tagEID_DOCUMENT_DATA;
//Ova funkcija cita podatke sa licne karte
EidReadDocumentData: function(pData: PEID_DOCUMENT_DATA): Integer; stdcall;
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll03.10.2010. u 20:22 - pre 115 meseci
> Igore hvala, funkcionise ali imam problema sa packed record.

Koji problem?

> Kako ova funkcija treba da se upotrebi i da vrati rezultat ?

To ne znam, moraš videti u uputstvu ako postoji ili pogledaj diskusije na ovu temu u C++ grupi.

> //Ova funkcija cita podatke sa licne karte
> EidReadDocumentData: function(pData: PEID_DOCUMENT_DATA): Integer; stdcall;

Code:

var
  Data: EID_DOCUMENT_DATA;
begin
  EidReadDocumentData(@Data); // Ti vidi postoje li neki posebni uslovi kako se poziva ta funkcija i da li se prosleđeni record (Data) mora inicijalizovati
end;


[Ovu poruku je menjao savkic dana 04.10.2010. u 02:11 GMT+1]
 
Odgovor na temu

dogriz
Sombor

Član broj: 29744
Poruke: 259
*.dynamic.sbb.rs.

Sajt: dogriz.blogspot.com


+6 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 10:28 - pre 115 meseci
Uz Savkićevu pomoć u prevodu API-ja, evo i primera za xcsdsgn:
Code (delphi):

procedure TForm1.Button1Click(Sender: TObject);
var
  PodaciOLK: EID_DOCUMENT_DATA;
  NepromenljiviPodaci: EID_FIXED_PERSONAL_DATA;
  PromenljiviPodaci: EID_VARIABLE_PERSONAL_DATA;
begin
  EidStartup(1);
  EidBeginRead('');
  EidReadDocumentData(@PodaciOLK);
  EidReadFixedPersonalData(@NepromenljiviPodaci);
  EidReadVariablePersonalData(@PromenljiviPodaci);
  EidEndRead;
  EidCleanup;
  Memo1.Clear;
  Memo1.Lines.Add('Reg.no: ' + PodaciOLK.docRegNo);
  Memo1.Lines.Add('Datum izdavanja: ' + PodaciOLK.issuingDate);
  Memo1.Lines.Add('Datum isteka: ' + PodaciOLK.expiryDate);
  Memo1.Lines.Add('Izdaje: ' + PodaciOLK.issuingAuthority);
  Memo1.Lines.Add('Prezime: ' + NepromenljiviPodaci.surname);
  Memo1.Lines.Add('Ime: ' + NepromenljiviPodaci.givenName);
  Memo1.Lines.Add('Prebivaliste - oznaka drzave: ' + PromenljiviPodaci.state);
  Memo1.Lines.Add('Prebivaliste - opstina: ' + PromenljiviPodaci.community);
  Memo1.Lines.Add('Prebivaliste - mesto: ' + PromenljiviPodaci.place);
  Memo1.Lines.Add('Prebivaliste - ulica: ' + PromenljiviPodaci.street);
end;
 

Sledeći problem je ćirilični upis podataka na LK. Ja koristim D2006 i ne mogu da pročitam ćirilične podatke (UTF-8).
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 12:11 - pre 115 meseci
> Sledeći problem je ćirilični upis podataka na LK. Ja koristim D2006 i ne mogu da pročitam ćirilične podatke (UTF-8).

Zašto? Da li si uradio konverziju dobijenih UTF8 stringova u WideString (recimo preko Utf8Decode)?
 
Odgovor na temu

dogriz
Sombor

Član broj: 29744
Poruke: 259
*.dynamic.sbb.rs.

Sajt: dogriz.blogspot.com


+6 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 12:37 - pre 115 meseci
Citat:
savkic:Zašto? Da li si uradio konverziju dobijenih UTF8 stringova u WideString (recimo preko Utf8Decode)?
Mislim da je problem u onom CELIK-API-ju, tamo su uglavnom svi elementi recorda tipa Char, tako da pretpostavljam da iščitavanje podataka preko prevedenih funkcija sa kartice ne valja, a samim tim ni dobijeni stringovi nisu ispravni, pa naknadna konverzija sa Utf8Decode nema smisla.
Evo i printScreen-a:
Prikačeni fajlovi
 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
*.dynamic.isp.telekom.rs.

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 12:56 - pre 115 meseci
I kod mene isto, bedak
 
Odgovor na temu

tkaranovic
Tomislav Karanović
Beograd

Član broj: 220507
Poruke: 269
*.adsl-a-2.sezampro.yu.



+13 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 14:47 - pre 115 meseci
Nemam čitač da probam a ovo uz poruku je kompajlirano sa D2010. Kod je ovaj koji poslat ovde.
Šta ispiše?
Prikačeni fajlovi
 
Odgovor na temu

xcsdsgn
Ratko Kuzmić
Serbia

Član broj: 206272
Poruke: 32
195.252.121.*

Sajt: csdsgn.co.nr


Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 15:34 - pre 115 meseci
Poruka za TKaranovic....


Probacu sutra tvoj projekat, ja posteno nisam uspeo.
Kada hocu da prevedem utf8tostr vraca mi karakuke.....
 
Odgovor na temu

savkic
Igor Savkić

Moderator
Član broj: 92186
Poruke: 2611



+68 Profil

icon Re: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll04.10.2010. u 16:18 - pre 115 meseci
> EidStartup(1);
> EidCleanup

Ti pozivaš svaki put, oni se moraju pozvati samo jednom, najbolje na početku rada programa i na kraju. Takođe pre poziva funkcije resetuj record npr:
FillChar(PodaciOLK, SizeOf(PodaciOLK), 0);

> Mislim da je problem u onom CELIK-API-ju,

BTW, postoji novija verzija dlla, svakako probaj sa njom.

> tamo su uglavnom svi elementi recorda tipa Char,

Kakve to ima veze?

> samim tim ni dobijeni stringovi nisu ispravni, pa naknadna konverzija sa Utf8Decode nema smisla.

Ubaci snimanje i učitavanje pročitanih recorda (izbriši bitne stvari) u neki stream pa pošalji čitav kod sa snimljenim podacima da mogu pogledati.

[Ovu poruku je menjao savkic dana 04.10.2010. u 17:28 GMT+1]
 
Odgovor na temu

[es] :: Pascal / Delphi / Kylix :: Kako iz delphi aplikacije procitati licnu kartu uz pomoc celikapi.dll

Strane: 1 2

[ Pregleda: 10003 | Odgovora: 38 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.