Stig Johansen used his keyboard to write :
> Stig Johansen wrote:
>
>> _Løsningerne_ ligger spredt undervejs i de forskellige indlæg, og jeg har
>> sendt nogle links til noget meget svært fordøjelig læsning, så 'wrap up'
>> er 'bare' en renskrift af 'facitlisten'.
>
> Jeg ved du har travlt med noget andet og det her er mere en 'husker' til mig
> selv, men for at få det fuldstændige overblik, mangler 'jeg' oplysning om
> den overordnede memoryhåndtering.
>
> Har du ikke en eller anden 'init' funktion, som du kalder som det
> allerførste. Her ville man normalt sende en pointer over til noget
> Comarea/Workspace eller lign. på en eller anden minimum størrelse?
>
> Noget i stil med:
> var
> Comarea : packed array [1..1000] of byte.
> .....
> flxInitDll (...,@Comarea,..)
>
> Jeg skal bruge det for at 'gå i dybden' men min forklaring.
Lad os se.
OnCreate / OnShow initiere en hel del af mine egne variabler, samt nogle kommunikationsfiler jeg selv bruger.
Noget af det sidste jeg gør i disse rutiner er en initier procedure (lavet af mig selv).
Ser ud som følger:
flxInitCallback(FLX_CALLBACK_STOPLIST,@OfflineAutoCode);
flxInitCallback(FLX_CALLBACK_SET_CARDDATA,@SetCardData);
flxInitCallback(FLX_CALLBACK_PRINT_RECEIPT,@Print_Receipt);
flxInitCallback(FLX_CALLBACK_DISPLAY_STATUS,@Display_Status);
flxInitCallback(FLX_CALLBACK_ABORT,@AbortTrans);
flxInitCallback(FLX_CALLBACK_ADVICEFLAG,@adviceFlag);
flxInitCallback(FLX_CALLBACK_SET_AMOUNT_FEE,@SetAmountFee);
flxInitCallback(FLX_CALLBACK_MENU,@MenuMenu);
flxInitCallback(FLX_CALLBACK_MENURESULT,@SetMenu);
fxlInitCallBack er defineret i flex.pas, som jeg benytter i min USES.
Unit Flex ser lidt sådan ud:
unit flex;
interface
uses
Windows;
Type
FLX_AMOUNT = dword;
STAN = record
data : array[0..2] of byte;
end;
PAN = record
len : byte;
data : array[0..9] of byte;
end;
.......
en masse flere type, const og variabler kommer nu.
procedure flxInitCallback(method_id:Integer; method_ptr:pointer); StdCall ; External 'flxdrv.dll';
function flxConnect(dummy:Integer):Integer; StdCall ; External 'flxdrv.dll';
function flxDisconnect:Integer; StdCall ; External 'flxdrv.dll';
function flxOpen:Integer; StdCall ; External 'flxdrv.dll';
function flxClose:Integer; StdCall ; External 'flxdrv.dll';
function flxCardTransaction (transactionType : Integer;
amount : FLX_AMOUNT;
currencyCode : Integer;
merchantInitiative : byte;
var refno : dword;
var error : Integer) : Integer; StdCall ; External 'flxdrv.dll';
.....
Nogle flere functioner
implementation
end.
Efter initiering gør jeg ikke rigtigt mere.
Andet end at kalde de der forskellige functioner.
Her er noget tekst fra en pdf fil:
5.3 The Flexdriver functions
This section describes the function used to set-up the Flexdriver and initiate routines on the Terminal. . For up to date information consult the latest flex.h file.
Using functions with Visual Basic 6, the WINAPI is using the __stdcall naming convention. The function name preceded by an underscore ( _ ) and followed by an at sign (@) and the size of the
function's arguments in bytes. No case translation is performed.
5.3.1 The flxInitCallback function
This function is used to set-up the Flexdriver with the functions that the ECR uses to print receipt etc.
Synopsis
void flxInitCallback( FLX_CALLBACK methodId, void* methodPtr );
Parameter description
methodId informs the flex-driver on which connection to use the method methodPtr.
The possible values for method_id are:
FLX_CALLBACK_SET_CARDDATA -> function which uses the card number
FLX_CALLBACK_PRINT_RECEIPT -> function to print the receipt
FLX_CALLBACK_DISPLAY_STATUS -> function to display status messages
FLX_CALLBACK_VERSIGCONFIRM -> function which verifies the signature
FLX_CALLBACK_ABORT -> function which aborts the transaction
FLX_CALLBACK_ADVICEFLAG -> function which uses advice flags
FLX_CALLBACK_ADVICELOG -> function to get a copy of terminal datastore operations
FLX_CALLBACK_MENU -> function to display menus on the ECR display
FLX_CALLBACK_MENURESULT -> function to reply to selected menu
FLX_CALLBACK_SET_AMOUNT -> function which delivers the amount
FLX_CALLBACK_SET_AMOUNT_FEE -> ECR calculates the fee in this function
FLX_CALLBACK_GET_AMOUNT_FEE -> Terminal calculates the fee and delivers it in this function
FLX_CALLBACK_GET_BINARY_RECEIPT -> The terminal delivers a binary receipt
FLX_CALLBACK_EARLY_STAN_PAN -> The terminal delivers transaction stan and pan
Notice that call-back methods must be initiated with flxInitCallback before the rest of the driver's methods can be used. Non of the call-back methods used as argument to flxInitCallback must be
blocking (The functions must return immediately).
Return values None
Example:
flxInitCallback( FLX_CALLBACK_SET_CARDDATA, setCardData );
flxInitCallback( FLX_CALLBACK_PRINT_RECEIPT, printReceipt );
flxInitCallback( FLX_CALLBACK_DISPLAY_STATUS, printStatus );
flxInitCallback( FLX_CALLBACK_ABORT, abortTransaction );
flxInitCallback( FLX_CALLBACK_VERSIGCONFIRM, verSigConfirmation );
flxInitCallback( FLX_CALLBACK_ADVICEFLAG, adviceFlag );
flxInitCallback( FLX_CALLBACK_MENU, showMenu );
flxInitCallback( FLX_CALLBACK_MENURESULT, resultMenu );
Ville gerne have vist dig mere af koden (faktisk hele programmet, hvis det var), men min chef syntes ikke det var "Verdens bedste idé"
Jeg har fundet en flex.h fil.
Syntes du på et punkt efterlyste en sådan:
#ifndef __FLEX_H
#define __FLEX_H
#ifdef __cplusplus
extern "C" { // only need to export C interface if
#endif // used by C++ source code
#ifdef _WIN32
#define DllExport __declspec(dllexport)
#else
#define DllExport
#endif
#define MAX_RECEIPT_SIZE 1600
#ifndef TRUE
#define TRUE 1
#define true TRUE
#endif
#ifndef FALSE
#define FALSE 0
#define false FALSE
#endif
// return values
#define SUCCESS 0x00
#define FAILURE 0x01
// flxConnect return values
#define CONNECT_OK 0x00
#define CONNECT_NO_INIFILE 0x01
#define CONNECT_INIFILE_READ_ERROR 0x02
#define CONNECT_COMPORTINITFAILURE 0x03
#define CONNECT_SW_NOTCOMPATIBLE 0x04
#define CONNECT_TERM_NOT_RESP 0x05
#define CONNECT_COMPORTOPEN 0x06
// Generel flx error values
#define DATALINKERROR 0x07
#define FUNCTION_NOT_POSSIBLE 0x08
#define TIMEOUT_IN_COMMUNICATION 0x09
#define CONNECT_NO_LICENCE 0x0A
#define CONNECT_INTERNAL_ERROR 0x0B
// flxCardTransaction return values when local card
#define LOCALCARD_OK 0x10
#define LOCALCARD_NOT_OK 0x11
// Trace level defines
enum {
CONF_PARAM = 1, // Placement of inifile
CONF_TRACE, // Enable trace
CONF_EXTTRACE, // Enable extensive tracing
CONF_EXTTRACE_PLUS // Enable extensive tracing with append
};
// Terminal/ECR communication communication type
enum {
RS232_COMM = 1,
ETHERNET_COMM
};
// CALLBACK METHODS
typedef enum {
FLX_CALLBACK_SET_CARDDATA = 0,
FLX_CALLBACK_PRINT_RECEIPT,
FLX_CALLBACK_DISPLAY_STATUS,
FLX_CALLBACK_ABORT,
FLX_CALLBACK_EXTCARDCONFIRM,
FLX_CALLBACK_VERSIGCONFIRM, // 5
FLX_CALLBACK_ADVICEFLAG,
FLX_CALLBACK_SET_AMOUNT, // send amount to terminal from ecr
FLX_CALLBACK_SET_AMOUNT_FEE, // send fee to terminal from ecr
FLX_CALLBACK_GET_AMOUNT_FEE, // receive fee from terminal to ecr
FLX_CALLBACK_STATUSTRACE, // 10
FLX_CALLBACK_STATETRACE,
FLX_CALLBACK_ADVICELOG,
FLX_CALLBACK_MENU,
FLX_CALLBACK_MENURESULT,
FLX_CALLBACK_GET_BINARY_RECEIPT, // 15
FLX_CALLBACK_EARLY_STAN_PAN,
FLX_CALLBACK_BREAK_IP,
} FLX_CALLBACK;
// Abort callback return values
#define OPERATORWISHTOABORT 0x01
#define OPERATORDONOTWISHTOABORT 0x02
// Receipt callback return values
#define RECEIPT_OK 0x01
#define RECEIPT_NOTOK 0x00
// verSigConfirmation callback return values
// used in resultmenu
#define SIGNATURE_OK 0x01
#define SIGNATURE_NOTOK 0x00
#define SIGNATURE_NOTKNOWNYET 0x02
// resultMenu
#define MENU_RESULT 0x03
// Carddata callback return values
#define CARDNUMBER_OK 0x01
#define CARDNUMBER_OK_CONFIRM 0x03 // External card confirm ...
#define CARDNUMBER_NOTOK 0x00
// cardType values
#define PBS_CARD 0x00
#define OTHER_CARD 0x01
// TRANSACTION METHODS
typedef enum {
FLX_TRANS_PURCHASE = 0, // Debit transaction
FLX_TRANS_REFUND, // Credit transaction
} FLX_TRANSTYPE;
// ERROR CODES
enum {
ERR_UNKNOWN = 0x00010000,
ERR_TERM_NOT_READY,
ERR_NO_CONNECTION,
ERR_NO_RECEIPT,
ERR_SW_NOTCOMPATIBLE,
ERR_NO_LICENCE
};
// ADMINISTRATION FUNCTIONS
typedef enum{
ADMIN_ENDOFDAY = 1,
ADMIN_ENDOFDAYLOG,
ADMIN_REPORT_TERMINALREPORT,
ADMIN_REPORT_TOTALS,
ADMIN_REPORT_LOG,
ADMIN_REPORT_OLDLOG,
ADMIN_LASTRECEIPT,
ADMIN_UNLOCK_RECEIPT,
ADMIN_CLOCKSYNCPBS,
ADMIN_CLOCKSYNCPOINT,
ADMIN_SENDLOG,
ADMIN_CLEARDATASTORE,
ADMIN_DOWNLOADPROGRAM,
ADMIN_DOWNLOADPARAM,
ADMIN_DOWNLOADPAN,
ADMIN_DOWNLOADTLCMDB,
ADMIN_RESTORETLCMDB,
ADMIN_CONTRASTUP,
ADMIN_CONTRASTDOWN,
ADMIN_RESTARTTERMINAL,
ADMIN_EJECTCARD,
ADMIN_MSC,
ADMIN_MAX, // last entry
} FLX_ADMIN_FUNCTION;
#define ADMIN_GET_DC_PROPERTIES_STAN 0x80
#define ADMIN_GET_DC_PROPERTIES_PAN 0x81
// CURRENCY CODES
typedef enum {
DKK=208, // DK Kroner
ISK=352, // IS Kroner
JPY=392, // JP Yen
NOK=578, // N Kroner
SEK=752, // S Kroner
CHF=756, // SW Francs
GBP=826, // GB Pound
USD=840, // US Dollar
EUR=978, // Euro
} CURR_CODES;
typedef enum {
MI_PIN = 0,
MI_OFFLINE = 0x60,
MI_FORCED_PIN = 0x81,
MI_FORCED_SIGNATURE = 0x82,
} FLX_MI;
#ifndef WIN32
typedef unsigned long FLX_AMOUNT; // Amount must be 4 bytes.
#else
typedef unsigned int FLX_AMOUNT; // Use 32 bit Windows
#endif
/* BINARY RECEIPT INFO STRUCT RETURNED BY FLX_CALLBACK_GET_BINARY_RECEIPT */
#ifndef _TIME_T_DEFINED
#ifndef BUILDING_LINUX_DLL
typedef long time_t; /* time value */
#endif
#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
#endif
typedef struct {
time_t gmtime; // Unix time stamp
FLX_AMOUNT total; // total amount in smallest currency unit
FLX_AMOUNT extra; // extra -
FLX_AMOUNT fee; // fee -
int currency; // Currency code (208=DKK, 978=EUR, 840=USD etc.)
int Stan; // PBS reference number converted from BCD code
int PSAM_Creator; // PSAM #
int PSAM_ID; // PSAM ID #
int MTI; // PBS apacs transaction code
int Asw1Asw2; // PSAM retur code (see OTRS specification)
int ActionCode; // Transaction result code
int refNr; // Transaction reference number passed from user
char pbsResult; // PBS Transaction result
char CvmStatus; // Cardholder verification method (eg. if signature required) see EMV specs.
char CardDataSource; // Magnetic- or chip card
char TR; // Transaction request
char nota; // True if signature on receipt
char copy; // True if receipt copy
char mt; // EMV decline code see EMV specification
char psn; // EMV pan sequence number see EMV specification
char lenPAN; // Length of PAN
char lenAID; // Length of AID
char PAN[10]; // Primary account number BCD code
char AID[16]; // EMV application ident.
char ATC[2]; // EMV value see EMV specification
char AED[3]; // EMV value see EMV specification
char ARC[2]; // EMV value see EMV specification
char PosEntryMode[3]; // Transaktionen information see OTRS and EMV specification.
int number; // Merchant PBS number
char authorizationCode[6+1]; // PBS authorization code as string
char CardName[16+1]; // Card name as string (+1 indicate string termination '\0')
char TermIdent[8+1]; // Terminal ID string
char name[18+1]; // Merchant name as string
char city[16+1]; // Merchant city as string
char address[24+1]; // Merchant address as string
char zip_code[8+1]; // Merchant zip code as string
char phone[24+1]; // Merchant phone number as string
char cvr[12+1]; // Merchant CVR number as string
} ReceiptStruct;
/* Structs used by the flxGetDCproperties callback method */
typedef struct {
unsigned char len;
unsigned char data[10];
} PAN;
typedef struct {
unsigned char data[3];
} STAN;
typedef union {
STAN stan;
PAN pan;
} STAN_PAN;
typedef struct {
STAN refStan; // unique psam transaction identifier
FLX_AMOUNT amount;
int currc; // curreccy code
int curre; // currency exponent
char DTHR[5]; // PBS timestamp year, month, day, hour, minute
} DC_RESULT;
/*
These CALLBACK FUNCTIONS are defined and coded in the ECR software
They are documented here for your convinience
These functions must be implemented by the ECR when mandatory or when used
(e.i. activated and defined using flxInitCallback).
*/
/*
Function: pcbPrintReceipt
printReceipt prints a formatted receipt or report.
Prototype: int printReceipt(unsigned int receipt_status, const char* cText);
Input: receipt_status - 0x01 if there are missing segments (e.g. during ADMIN_REPORT_LOG)
0x00 if it is the last/whole segment (all transaction receipts).
cText - receipt text coded as ISO 8859-15 and 0 terminated.
maximum length in 1000 characters incl. '\0'.
If a larger text must be printed divided in smaller segments.
Output: -
Return: RECEIPT_OK - receipt printed OK
RECEIPT_NOTOK - receipt NOT printed OK
*/
/*
Function: pcbAbort
printAbort asks if operator whish to abort currect transaction.
During transactions the flex-driver repeatedly calls the abortTransaction function.
Notice that even though the ECR tries to abort a Transaction, it might not be aborted.
It is the Terminal that decides if the Transaction is aborted, or not.
This function must be implement
Prototype: int pcbAbort (void);
Input: -
Output: - -
Return: OPERATORWISHTOABORT - Abort
OPERATORDONOTWISHTOABORT - do not abort
*/
/*
Function: pcbSetCarddata
pcbSetCarddata gives cardnumber cardtype and crc (card reconcilliation counter id).
Can be used by the ECR to reject certain types of credit cards,
e.g. if a customer wishes to get some cash together with the purchased item,
then the ECR should ensure that the swiped card isn't a credit card.
Prototype: int setCarddata(const char *cPan, int cardtype);
Input: *cPan - pointer to 8 first numbers in cardnumber(pan),crc in ascii
(e.g. 54130347,1 (1 is dankort))
cardtype - PBS_CARD - eg. Dankort
OTHER_CARD - eg. Local card
Output: -
Return: CARDNUMBER_OK - cardnumber ok
CARDNUMBER_OK_CONFIRM - cardnumber (e.g. local card) OK
CARDNUMBER_NOTOK - cardnumber nor ok
*/
/*
Function: pcbDisplayStatus
pcbDisplayStatus gives an ascii status line
Prototype: void pcbDisplayStatus(const char cStat[21], unsigned int line);
Input: cStat[] - pointer 20 char ascii string plus '\0' termination coded as ISO 8859-15
line - suggested status line number (1-4)
Output: -
Return: -
*/
/*
Function: pcbVerSigConfirm
pcbVerSigConfirm asks for signature approval on a signaturetransaction.
E.g. it could be implemented so the operator e.g. presses 'F1' for approval and 'F2' for rejected.
The PSAM decides if this functionality is used or not.
If it is not called and the transaction is approved, both receipts will be sent from the terminal straight away.
If the signature afterwards seems fake, the operator must run a refund.
Prototype: int pcbVerSigConfirm (void);
Input: -
Output: -
Return: SIGNATURE_OK
SIGNATURE_NOTOK
SIGNATURE_NOTKNOWNYET
*/
/*
Function: pcbAdviceFlag
pcbAdviceFlag signals that balancing/endofday routine is nessesary
Meaning that the ECR must not be able to run further transactions before the endofday routine is run and approved.
This function is mandatory to implement
Prototype: void pcbAdviceFlag (void);
Input: -
Output: -
Return: -
*/
/*
Function: pcbSetAmount
pcbSetAmount sets the transaction amount
If this function isn't initialised in the flxInitCallback function,
then the amount given in the flxCardTransaction is used.
Prototype: FLX_AMOUNT pcbSetAmount(void);
Input: -
Output: -
Return: FLX_AMOUNT - the transaction amount (always positive)
amount in lowest currency denomination (e.g. øre).
*/
/*
Function: pcbGetAmountFee
pcbGetAmountFee gives the fee calculated in the terminal.
Prototype: void pcbGetAmountFee(FLX_AMOUNT fee);
Input: fee - fee
Output: -
Return: -
*/
/*
Function: pcbSetAmountFee
pcbSetAmountFee gives the fee calculated in the terminal.
Prototype: FLX_AMOUNT pcbSetAmountFee(void);
Input: -
Output: -
Return: FLX_AMOUNT - the transaction fee (always positive) calculated by the ECR
amount in lowest currency denomination (e.g. øre).
if used in with pcbGetAmountFee, it overrules the terminal fee.
*/
/*
Function: pcbStatusTrace
pcbStatusTrace
Prototype: void pcbStatusTrace (const char *trace);
Input: -
Output: -
Return: -
*/
/*
Function: pcbStateTrace
pcbStateTrace
Prototype: void pcbStateTrace (int state);
Input: -
Output: -
Return: -
*/
/*
Function: pcbAdviceLog
pcbAdviceLog sends copies of datastore operations to the ECR.
The transaction time is increased by approx half a second when using this function.
Prototype: void adviceLog (unsigned int len, const unsigned char* data);
Input: len - length of advice data
*date - pointer to advise data
Output: -
Return: -
*/
/*
Function: pcbMenu
pcbMenu is currently used to display information to the operator.
E.g. if or if not an EMV card is placed correctly in the terminal (command=0).
The function is also used for the operator to choose between EMV applications
in correlation with refund transactions (10 <= command >= 1).
Prototype: void pcbMenu(unsigned char command, int timeout, unsigned char lines, const char menus[][21]);
Input: command - command (or suggested line to display).
0: EMV card inserted correct?
1-10: suggested menu to display.
timeout - timeout value that the ECR must answer whihin (using pcbMenuResult)
lines - number of lines in menu (max. 10)
menus[][] - menulines in ascii from 1 to 10
each line is 20 char plusterminating '\0'.
Output: -
Return: -
*/
/*
Function: pcbMenuResult
pcbMenuResult is called repetitively (like abort), to verify the choice made by the operator,
when a menu is displayed on the ECR screen.
Prototype: void pcbMenuResult(char *result);
Input: *result - pointer to result holding selected line in menu
Output: -
Return: 0 - the answer isn’t known yet (the operator hasn’t pressed a key) and no timeout has occurred.
1 - the chosen menu point must be entered in the result variable
e.g. *result = 1 if first menu line is selected.
If a timeout has occurred, *result = -2 (used internally).
*/
/*
Function: pcbGetReceipt
pcbGetReceipt returns a 'binary' receipt struct defined in Receipttruct.
Prototype: void pcbGetReceipt (ReceiptStruct *rs);
Input: *rs - pointer to result struct holding binary receipt
Output: -
Return: -
*/
/*
Function: pcbEarlyStanPan
get stan and pan as early as possible in transaction flow.
This function is used with the flxGetDCProperties method.
Prototype: void pcbEarlyStanPan(STAN* stan, PAN* pan, char *DTHR);
Input: *stan - pointer to hold stan
*pan - pointer to hold pan
*DTHR - pointer to hold transaction timestamp in dthr format
Output: stan - stan
pan - pan
Return: -
*/
/*
Function: pcbBreakIP
break the ip idle wait
Prototype: int pcbEarlyStanPan(void);
Input: -
Output: -
Return: true if break
*/
/* FLEX FUNCTIONS */
/*
Function: flxInitCallback
initialize and activate callback function
Input: method_id - id from FLX_CALLBACK enum
method_ptr - pointer to callback function
Output: -
Return: see return value defines
*/
DllExport void flxInitCallback (
FLX_CALLBACK method_id,
void* method_ptr);
/*
Function: flxConnect
connect to terminal
flxdrv.ini file used by function to determine connect type.
Input: dummy - internal use , set to 0
Output: -
Return: see return value defines for flxConnect
*/
DllExport int flxConnect(
int dummy);
/*
Function: flxDisconnect
disconnect to terminal
flxdrv.ini file used by function to determine disconnect type.
Input: -
Output: -
Return: SUCCESS
*/
DllExport int flxDisconnect(
void);
/*
Function: flxOpen
open session to terminal
flxdrv.ini file used by function to determine open type.
Input: -
Output: -
Return: see return value defines
*/
DllExport int flxOpen(
void);
/*
Function: flxClose
close session to terminal
flxdrv.ini file used by function to determine close type.
Input: -
Output: -
Return: SUCCESS
*/
DllExport int flxClose(
void);
/*
Function: flxCardTransaction
initiate a card transaction
Input: transactionType - from enum FLX_TRANSTYPE
amount - transaction amount in smallest currency unit (eg. øre)
currencyCode - currency code from CURR_CODES
merchantInitiative - 0x00 - PIN transaction
0x60 - Offline transaction
0x81 - Forced PIN transaction
0x82 - Forced Signature transaction
see PBS OTRS 2.1 (table 9.3.37) documentation for more information
refno - your transaction reference number
(returned in ReceiptStruct)
Output: *error - ptr to error code
0x00 (SUCCESS)
ERR_UNKNOWN
ERR_NO_CONNECTION
ERR_NO_RECEIPT
Return: see return value defines
*/
DllExport int flxCardTransaction(
FLX_TRANSTYPE transactionType,
FLX_AMOUNT amount,
int currencyCode,
unsigned char merchantInitiative,
const unsigned int refno,
unsigned int *error);
/*
Function: flxCompleteExtCardTransaction
used to complete a extern (local) card transaction
Input: result - 0x00 approves the transaction
0x01 rejects the transaction
Output: -
Return: see return value defines
*/
DllExport int flxCompleteExtCardTransaction(
int result);
/*
Function: flxAdministration
used to initiate administrative functions in the terminal
Input: func - function from FLX_ADMIN_FUNCTION enum
Output: *error - ptr to error code
0x00 (SUCCESS)
ERR_UNKNOWN
ERR_NO_CONNECTION
ERR_NO_RECEIPT
Return: see return value defines
*/
DllExport int flxAdministration(
FLX_ADMIN_FUNCTION func,
unsigned int *error);
/*
Function: flxGetDllVersion
gets dll windows product version
Input: -
Output: -
Return: 0x0000 - no version
0xMMmm - MM Major Version truncated to 2x16 bit
mm Minor version truncated to 2x16 bit
*/
DllExport int flxGetDllVersion(void);
/*
Function: flxGetTerminalState
gets the state of the terminal
Input: -
Output: -
Return: terminal state, consult flxdrv.dll manual
*/
DllExport int flxGetTerminalState(
void);
/*
Function: flxGetFiles
gets files from the terminal
Input: consult flxdrv.dll manual
Output: -
Return: consult flxdrv.dll manual
*/
DllExport int flxGetFiles(
const char* dir);
/*
Function: flxSetConfiguration
sets the driver configuration parameter
Input: func - selects parameter
Output: -
Return: consult flxdrv.dll manual
*/
DllExport int flxSetConfiguration(
int func, ...);
/*
Function: flxSetTrace
set dll trace level
Input: traceLevel - see trace level defines
Output: -
Return: -
*/
DllExport void flxSetTrace(
int traceLevel);
/*
Function: flxGetTrace
return dll trace level
Input: -
Output: -
Return: tracelevel - see trace level defines
*/
DllExport int flxGetTrace(void);
/*
Function: int flxGetDCProperties(char stanPan, STAN_PAN *stanPan)
search the PSAM (version >= 50) for status of previous transactions.
Input: stanPan - if 0x80 use stan as search key
- if 0x81 use pan as search key
Output: dcRes - search result as DC_RESULT struct if return SUCCESS
memset to 0 if return is FAILURE
Return: FAILURE - if the PSAM cannot be accessed at this time or no search match
SUCCESS - OK.
*/
DllExport int flxGetDCProperties(char stanPan, STAN_PAN *pStanPan, DC_RESULT *dcRes);
DllExport int flxIdleIProuting(int *error);
#ifdef __cplusplus
}
#endif
#endif // __FLEX_H
--
Best Regards / Venlig hilsen
Michael Vilhelmsen
==========
Best Regards / Venlig hilsen
Michael Vilhelmsen