Byte Array with Parameter in CApi

Post Reply
Gross
Posts: 41
Joined: Sat Mar 09, 2013 8:17 am
Location: Germany Kassel
Contact:

Byte Array with Parameter in CApi

Post by Gross »

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ß
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Byte Array with Parameter in CApi

Post by Enrico Maria Giordano »

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

BYTE bPass [] = hb_parc( 1 );
EMG
Post Reply