FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dll Parameter Type (POINTER) and return (BYTE)
Posts: 13
Joined: Mon Aug 02, 2010 05:15 PM
Dll Parameter Type (POINTER) and return (BYTE)
Posted: Tue Dec 18, 2012 12:23 PM
Hi Guys!

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

See code in xHarbour:

Code (fw): Select all Collapse
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 (fw): Select all Collapse
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

Continue the discussion