JNA duvida montar interface

0 respostas
S

Galera preciso montar uma interface para usar uma DLL pela JNA, os metodos que preciso acessar na DLL, são estes

BBEMVActivateKernel
BBEMVBDC
BBEMVCAPKDown
BBEMVCancellation
BBEMVConvertDE
BBEMVDataCaptureInit
BBEMVDeActivateKernel
BBEMVFinishTransaction
BBEMVRetrieveDC
BBEMVRetrieveDE
BBEMVSetCachBack
BBEMVSetForceOnline
BBEMVSetPrint
BBEMVTSCntInit

A documentação me mostra como usar estes metodos no C.
Minha duvida é como passar estes metodos para a interface Java.

Segue abaixo a documentação de alguns metodos

BBEMVActivateKernel

Please activate EMV Kernel. Be sure to be recalled these following function before using EMV Kernel API.

Prototype	BBEMV_API DWORD BBEMVActivateKernel(PTERM_CFG pterm_cfg, PBBEMV_CALLBACK_FUNC pcallback_func);

Return	Error Code

Parameter	Description

pterm_cfg	[in] TERM_CFG Pointer of structure.

Please set Terminal configuration of EMV Kernel.

If ucConfigNum of TERM_CFG is ?0?, Please use users? Terminal Configuration. Unless ucConfigNum is ?0?, use Terminal Configuration which is used for certifying. The first Byte of Configuration shows the lenth of Configuration.

Ex)

term_cfg.DE_9F15[0] = 0x02; // Length : 2bytes

term_cfg.DE_9F15[1] = 0x12;

term_cfg.DE_9F15[2] = 0x34;

pcallback_func	

[in] BBEMV_CALLBACK_FUNC Pointer of structure. Please set the callback function to be required application at EMV Kernel.

BBEMVCancellation
Cancel the EMV transaction
Prototype BBEMV_API DWORD BBEMVCancellation(unsigned long ulSeqCnt);
Return Error Code
Parameter Description
ulSeqCnt [in] Transaction Sequence Count

BBEMVRetrieveDE
Get value of all Data Element which is in EMV Kernel store EMV Kernel.
Prototype BBEMV_API DWORD BBEMVRetrieveDE(PDATA_ELEMENT pDataElement);
Return Error Code
Parameter Description
pDataElement [in] DATA_ELEMENT Structure of Pointer. The obtained functional symbol of Data Element Value is suggested to demonstrate with changed of Char through
BBEMVConvertDE. The first Byte of each Data Element corresponds to proper Data Element.

BBEMVRetrieveDC
Get value of all Data Capture which is in EMV Kernel store EMV Kernel.
Prototype BBEMV_API DWORD BBEMVRetrieveDC(PBATCH_DATA pBatchData);
Return Error Code
Parameter Description
pBatchData [in] BATCH_DATA Structure of Pointer

BBEMVConvertDE
Make changing of Data Element Value as Char
Prototype BBEMV_API DWORD BBEMVConvertDE(unsigned char *source, unsigned char *dest, unsigned char *ret_len, unsigned char type);
Return Error Code
Parameter Description
*source [in] Change of Data Element of Pointer
*dest [out] Keeping in Buffer the result Value
*ret_len [out] Pointer for receiving the length of returned data
type [in] Type for making changing of Data Element
*Refer to Data Elements Table- Annex A of EMV Standard Book3
If the Format is b, it will ?b?, an will be ?s? and cn will be ?c?, n will be ?n?

Alguem poderia me ajudar como o que usar para montar estes metodos, como mostrado na documentação existe tipos ponteiros e outros que não sei como representar no Java. Obrigado

Criado 27 de outubro de 2009
Respostas 0
Participantes 1