Re: UDT bug

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michael C (mculley_at_NOSPAMoptushome.com.au)
Date: 02/08/05


Date: Tue, 8 Feb 2005 11:09:20 +1100


"Jim Mack" <jmack@mdxi.nospam.com> wrote in message
news:u5q7VpWDFHA.624@TK2MSFTNGP15.phx.gbl...
> If padding concerns you, a good general rule is to place elements in
> order of descending size of the underlying types: first all 8-byte types
> (Currency, Double), then all 4-byte types (Long, Single etc), then
> 2-byte types (Integer, Boolean), then fixed-length strings, and finally
> bytes.
>
> Done this way there will be little or no need for padding, and
> structures will be compatible between VB and C.

Provided you get to define the order. If you don't you can pass a byte array
into the API call and then manually copy the data to the UDT.

Michael



Relevant Pages

  • Re: UDT bug
    ... "Jim Mack" wrote in message ... > If padding concerns you, a good general rule is to place elements in ... Michael ...
    (microsoft.public.vb.syntax)
  • Re: Anchor Spacing
    ... =A0 padding: 0; ... Just use the icon instead: ... Michael F. Stemper ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: How can I remove the padding??
    ... Lara wrote: ... After I apply (padarray) function ... How can I remove the padding?? ...
    (comp.soft-sys.matlab)