Re: UDT bug
From: Michael C (mculley_at_NOSPAMoptushome.com.au)
Date: 02/08/05
- Next message: RB Smissaert: "Re: Dir Function"
- Previous message: Karl E. Peterson: "Re: Default values in and exe file"
- In reply to: Jim Mack: "Re: UDT bug"
- Next in thread: Danny: "Re: UDT bug"
- Reply: Danny: "Re: UDT bug"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: RB Smissaert: "Re: Dir Function"
- Previous message: Karl E. Peterson: "Re: Default values in and exe file"
- In reply to: Jim Mack: "Re: UDT bug"
- Next in thread: Danny: "Re: UDT bug"
- Reply: Danny: "Re: UDT bug"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|