Re: DLL Function which returns values in input parameters
- Posted by Rad <radhx at rediffmail.com> Nov 07, 2006
- 560 views
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> {{{ > >