Announcement

Collapse
No announcement yet.

VB-PB UDT alignment (is this stupid?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VB-PB UDT alignment (is this stupid?)

    I fully understand the alignmet issues for UDT's in VB and PB (and others).. But is this a really stupid idea.? What I've done is to open a file in a ram drive, 'Put' my VB UDT and then call PB. PB opens the file and reads it into a byte array and does the fast stuff. No alignment problems!! and as far as i can tell it's faster than passing a pointer of the UDT and "padding" it in PB and lots less work.

    Just a thought
    Doug
    Doug McDonald
    KD5NWK
    www.redforksoftware.com

  • #2
    This technique is sure to be slower than passing the UDT directly but, of course, the difference may be entirely insignificant for your application. It's a creative solution, though, and it does have the advantage that you can use the same code in both PowerBASIC and VB.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment

    Working...
    X