Dll Parameter Type (POINTER) and return (BYTE)

Post Reply
digordo
Posts: 13
Joined: Mon Aug 02, 2010 5:15 pm

Dll Parameter Type (POINTER) and return (BYTE)

Post by digordo »

Hi Guys!

I'm execute a Dll Function and some parameters is Ref BYTE type. How can i call ?

See code in xHarbour:

Code: Select all

Function Test()
Local hHandle := LoadLibrary("EasyInner.dll")
Local pReceberDados := DllPrepareCall( hHandle, DC_CALL_STD,"ReceberDadosOnLine") 
Local nNumCol          := 1
Local nOrigem          := 0
Local nComplemento:= 0
Local cCartao          := ""
Local nDia               := 0
Local nMes              := 0
Local nAno              := 0
Local nHora            := 0
Local nMinuto        := 0
Local nSegundo      := 0
Local nRet
nRet := DllExecuteCall( pReceberDados , nNumCol , @nOrigem, @nComplemento, @cCartao, @nDia, @nMes, @nAno, @nHora, @nMinuto, @nSegundo)

Return nRet
 
The return of function is always strange numbers, with 9..8..digits...i don't no why.
And the var ref parameters is alwarys 0, but the value of cCartao is ok.

Delphi (Define):

Code: Select all

Function ReceberDadosOnLine( Inner:Integer; Origem, Complemento: Pointer; Cartao: PChar; Dia, Mes, Ano, Hora, Minuto, Segundo:Pointer):Byte; stdcall; external 'EasyInner.dll';
 
Can anyone help?


Thks
Post Reply