DLLCALL

DLLCALL

Postby zazibr » Sun Apr 06, 2008 4:50 pm

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 ?
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
zazibr
 
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: JoseAlvarez and 73 guests