Re: DLL Function which returns values in input parameters

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Chris & Greg,

Thanks guys for the help.
I could get the function working using allocate() and peek4u().

Thanks once again.

Regards,
Rad.


Greg Haberek wrote:
> 
> > RegOptions        = allocate(4) -- INT
> > SerialExpire      = allocate(4) -- INT
> > SerialExpireDay   = allocate(4) -- INT
> > SerialExpireMonth = allocate(4) -- INT
> > SerialExpireYear  = allocate(4) -- INT
> > RegExpire         = allocate(4) -- INT
> > RegExpireDay      = allocate(4) -- INT
> > RegExpireMonth    = allocate(4) -- INT
> > RegExpireYear     = allocate(4) -- INT
> 
> You must then use peek4u() to read each value from its location in memory.
> 
> i.e.
> 
> }}}
<eucode>
> atom pRegOptions, -- pointer
>     vRegOptions -- value
> 
> -- allocate vars
> pRegOptions = allocate( 4 ) -- INT
> 
> -- call function
> 
> -- read values
> vRegOptions = peek4u( pRegOptions )
> 
> -- free memory
> free( pRegOptions )
> 
> -- use values
> </eucode>
{{{

> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu