>I have a VB Code that has Define Data Structure like this using VB type statement
>
...snip
>type SP_INIT
> istatus As long
> SEnv as String * 10
> Sversion as String * 5
>end type
>
...snip
function declaration:
Declare long SP_initialized in "SP_W32" STRING @ocnitdata
You must passing parameter as string
type definition:
#define SP_INIT ;
( ;
replicate( chr(0), 4) + ; && istatus as long
replicate( chr(0), 10) + ; && SEnv as String * 10
replicate( chr(0), 5) ; && Sversion as String * 5
)
local lcParam, lnResult
lcParam = SP_INIT && lcParam represent SP_INIT type
lnResult = SP_initialized( lcParam)
* ctobin( left( lcParam, 4)) as istatus
* subs( lcParam, 5, 10) as SEnv
* subs( lcParam, 15) as Sversion
Good luck !
Alexander Grigorjev.
Alex