Re: Passing Structs to 'C' Dll

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

I wrote:

>    ADDRESS + ( SIZEOF_RGB_ENTRY * (12-1) )
> => ADDRESS + ( SIZEOF_RGB_ENTRY * 11 )
> => ADDRESS + ( 12 * 11 )
> => ADDRESS + 131

This is using the wrong SIZEOF_RGBENTRY, it should be:

     ADDRESS + ( SIZE_OF_RGBENTRY * (12-1) )
  => ADDRESS + ( SIZE_OF_RGBENTRY * 11 )
  => ADDRESS + ( 3 * 11 )
  => ADDRESS + 33

Mea culpa.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu