Byte Array with Parameter in CApi

Byte Array with Parameter in CApi

Postby Gross » Thu May 18, 2017 2:51 pm

Hi,
I have a function which would like to call by parameters
PRG:
NRet: = CBIOS_UPWLogin ("demo\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00")

Lib: libcbios.a is available

// in cbios.h
DWORD WINAPI CBIOS_UPWLogin (BYTE bUPW [0x10]);


// The funcion without parameters is ok
HB_FUNC (CBIOS_UPWLOGIN)
{
DWORD dwRet;
BYTE bPass [] = "demo\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";

DwRet = CBIOS_UPWLogin (bPass);
Hb_retnl ((LONG) dwRet);

}

How does the C function with parameter transfer look like?

Greeting Manfred
Manfred Groß
Gross
 
Posts: 41
Joined: Sat Mar 09, 2013 8:17 am
Location: Germany Kassel

Re: Byte Array with Parameter in CApi

Postby Enrico Maria Giordano » Thu May 18, 2017 8:42 pm

Gross wrote:Hi,
I have a function which would like to call by parameters
PRG:
NRet: = CBIOS_UPWLogin ("demo\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00")

Lib: libcbios.a is available

// in cbios.h
DWORD WINAPI CBIOS_UPWLogin (BYTE bUPW [0x10]);


// The funcion without parameters is ok
HB_FUNC (CBIOS_UPWLOGIN)
{
DWORD dwRet;
BYTE bPass [] = "demo\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";

DwRet = CBIOS_UPWLogin (bPass);
Hb_retnl ((LONG) dwRet);

}

How does the C function with parameter transfer look like?

Greeting Manfred


Code: Select all  Expand view
BYTE bPass [] = hb_parc( 1 );


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 39 guests