Page 1 of 1

DLLCALL

PostPosted: Sun Apr 06, 2008 4:50 pm
by zazibr
ola pessoal

estou chamando uma dll para gerar codigo de barras ja uso ela em clarion e gostaria de usar no fw


Code: Select all  Expand view

o .h em c esta assim
//SeqLib32.h

extern "C"
{
void far stdcall  Sequence2(unsigned char Code, unsigned char Options, char far *datain, char far *dataout);
}
//Make sure that there is enough space in "dataout" to hold returned sequence. It may
//be longer than the original data!


1a Tentativa
============

cBarrasEnvio     := "006198003004"
cBarrasRetorno := Space( 12 )

hCodigoBarras:= LoadLibrary("SeqLib32.DLL")
nProcesso    := GetProcAddress(hCodigoBarras, "Sequence2" )
nRetorno     := DLLCALL(  hCodigoBarras,nProcesso,, 2, 0, @cBarrasEnvio, @cBarrasRetorno )

so que o retorno (cBarrasRetorno) é vazio

2a Tentativa
============

#define DC_CALL_STD            0x0020

cBarrasEnvio    := "006198003004"
cBarrasRetorno := Space( 12 )
nRetorno := DLLCALL(  "SeqLib32.dll" ,DC_CALL_STD,"sequence2", 2, 0, @cBarrasEnvio, @cBarrasRetorno )

so que o retorno (cBarrasRetorno) é vazio




alguma dica ?