Einzelnen Beitrag anzeigen

kaju74

Registriert seit: 22. Okt 2003
185 Beiträge
 
#10

AW: Gegf. interessant für Benutzer die mit MSSQL von Konto/BLZ auf IBAN/BIC umsteige

  Alt 13. Sep 2013, 12:43
Hi.

Habe sie mittlerweile selber gemacht:

Code:
interface

{ library declarations }

{$WARN SYMBOL_PLATFORM OFF}
// dta methods
function sevDTA_BICExists(sBIC, sBlz: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_BLZExists(sBlz: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_BLZFileDate(sDatum: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_BLZGetInfo(sBlz, sName, sPz: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_BLZGetInfoEx(sBlz, sName, sPlz, sOrt, sBIC: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CheckCdtrId(sCdtrId: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CheckCreditCard(sCardType, sCardNr, sMsgText: PAnsiChar; lLenRet: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CheckIBAN(sIBAN: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CheckKontoNr(sBlz, sKontoNr, sPz: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CreateFile(sFilename: PAnsiChar; bOvrWriteExists: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_CreateFileEx(sFilename: PAnsiChar; bOvrWriteExists: LongInt; sReferenzNr, sDatum: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_FileAddRec(lHandle: LongInt; sBlz1, sKtoNr1, sName1, sIntKdNr, sBlz2, sKtoNr2, sName2, sVerwendung, sBetrag: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_FileAddRecEx(lHandle: LongInt; sBlz1, sKtoNr1, sName1, sIntKdNr, sBlz2, sKtoNr2, sName2, sVerwendung, sBetrag, sTextschluessel, sTextschluesselErw: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_FileEnd(lHandle: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_FileInit(lHandle: LongInt; sKz, sBlz, sKtoNr, sName: PAnsiChar; bEuro: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_Init(sInit: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevDTA_Kontrollsummen(sSumDaten, sSumBlz, sSumKtoNr, sSumBetrag: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
procedure sevDTA_BLZSetPath(sPath: PAnsiChar); stdcall; external 'sevDTA20.dll' delayed;
procedure sevDTA_Close(lHandle: LongInt); stdcall; external 'sevDTA20.dll' delayed;
procedure sevDTA_Print(hDC: LongInt; sPrnName, sFontName, sName, sBLZ, sKontoNr, sDatum: PAnsiChar); stdcall; external 'sevDTA20.dll' delayed;
procedure sevDTA_PrintEx(hDC: LongInt; sPrnName, sFontName, sName, sBLZ, sKontoNr, sDatum, sVolNr, sLogNr: PAnsiChar); stdcall; external 'sevDTA20.dll' delayed;

// sepa methods
function sevSEPA_CalcIBAN(sBlz, sKontoNr, sBIC, sIBAN: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_CreateFile(sFilename: PAnsiChar; bOvrWriteExists: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_FileAddRec(lHandle: LongInt; sPmtId, sPmtAmt, sDebCredNm, sIBAN, sBIC, sRmtInf, sMndtId, sMndtDt: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_FileEnd(lHandle: LongInt): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_FileInit(lHandle: LongInt; sKz, sInitgPtyName, sDebCredNm, sIBAN, sBIC, sPmtInfId, sExctnDate: PAnsiChar; lLcCode, lSeqType: LongInt; sCdtrId: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_IBANIsValid(sIBAN, sBIC: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
function sevSEPA_SetProperty(sProperty, sValue: PAnsiChar): LongInt; stdcall; external 'sevDTA20.dll' delayed;
procedure sevSEPA_CloseFile(lHandle: LongInt); stdcall; external 'sevDTA20.dll' delayed;
procedure sevSEPA_ExportHTML(sFilename: PAnsiChar); stdcall; external 'sevDTA20.dll' delayed;
{$WARN SYMBOL_PLATFORM ON}

{ error constants }
const
  // initialize
  ERR_DTA_INIT_OK = 0;
  ERR_DTA_SUCCESS = 0;
  ERR_DTA_INIT_FAILURE = -1;

  // file handle
  ERR_DTA_NO_FILEHANDLE = 1;
  ERR_DTA_BAD_FILEHANDLE = 2;

  // dtaus
  ERR_DTA_BAD_KZ = 100;
  ERR_DTA_BAD_BLZ = 101;
  ERR_DTA_BAD_BLZ_LEN = 102;
  ERR_DTA_BAD_KTONR = 103;
  ERR_DTA_BAD_KTONR_LEN = 104;
  ERR_DTA_BAD_VALUE = 105;
  ERR_DTA_NO_VALUE = 106;
  ERR_DTA_NO_NAME = 107;

  // account
  ERR_BLZ_OK = 0;
  ERR_BLZ_NO_FILE = 200;
  ERR_BLZ_NOT_FOUND = 201;
  ERR_BLZ_WRONG_FORMAT = 202;

  ERR_BLZ_KTONR_OK = 0;
  ERR_BLZ_KTONR_WRONG = 211;
  ERR_BLZ_KTONR_NOCHECK = 212;

  // bic
  ERR_BIC_OK = 0;
  ERR_BIC_NO_FILE = 200;
  ERR_BIC_NOT_FOUND = 201;

  // sepa
  ERR_SEPA_SUCCESS = 0;
  ERR_SEPA_BAD_KZ = 300;
  ERR_SEPA_BAD_IBAN = 301;
  ERR_SEPA_BAD_BIC = 302;
  ERR_SEPA_NO_INITGPTYNM = 303;
  ERR_SEPA_NO_DBTRNM = 304;
  ERR_SEPA_NO_CDTRNM = 305;
  ERR_SEPA_NO_VALUE = 306;
  ERR_SEPA_NO_CDTRID = 307;
  ERR_SEPA_NO_RMTINF = 308;
  ERR_SEPA_NO_MNDTID = 309;
  ERR_SEPA_WRONG_SEQTYPE = 310;

  ERR_SEPA_NO_FILEHANDLE = 1;
  ERR_SEPA_BAD_FILEHANDLE = 2;

  ERR_SEPA_CALCIBAN_ERROR = 400;
  ERR_SEPA_CALCIBAN_WARNING = 401;
  ERR_SEPA_CALCIBAN_NOUSAGE = 402;

  // credit cars
  ERR_CREDIT_OK = 0;
  ERR_CREDIT_FIRST_DIGITS = 1;
  ERR_CREDIT_DIGIT_COUNT = 2;
  ERR_CREDIT_WRONG_PZ = 4;
  ERR_CREDIT_UNKNOWN_TYPE = 16;
LG,
Marc

P.S.: Sie ist für Delphi2010 und nutzt das Delayed-Binding...
  Mit Zitat antworten Zitat