Jeff,
I am not showing a[99], my code shows a[0].
In C language arrays are zero based, not 1 based, like in Clipper
#include "FiveWin.ch"
function Main()
local cArray := FillArray()
MsgInfo( A99( cArray ) )
TestFunc1( cArray )
MsgInfo( A99( cArray ) )
return nil
DLL FUNCTION TESTFUNC1( pValues AS LPSTR ) AS BOOL PASCAL ;
FROM "TestFunc1" LIB "TestLib12.dll"
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
HB_FUNC( FILLARRAY )
{
LONG a[ 128 ];
int i;
for( i = 0; i < 128; i++ )
a[ i ] = i;
hb_retclen( ( char * ) a, 128 * sizeof( LONG ) );
}
HB_FUNC( A99 )
{
LONG * a = ( LONG * ) hb_parc( 1 );
hb_retnl( a[ 99 ] );
}
#pragma ENDDUMP
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 60 guests