No announcement yet.

RTLMoveMemory: Dest = UDT Src = String

  • Filter
  • Time
  • Show
Clear All
new posts

  • Tom Hanlin
    PowerBASIC types are currently byte-aligned unless specified otherwise. It's fair to describe MoveMemory as inherently dangerous, but as long as the positions and length are ok, there's no problem.

    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:

  • Mike Joseph
    started a topic RTLMoveMemory: Dest = UDT Src = String

    RTLMoveMemory: Dest = UDT Src = String

    Ive been using MoveMemory to copy portions of a file (via Get$ into a string buffer) into a UDT. Right now this appears to be working just fine. My question is, is there anything inherently dangerous in filling a UDT in PB this way? For instance, are there any issues involving alignment when the UDT is comprised of several differet datatypes? As far as I can tell, there doesnt appear to be.
    Thanks in advance for the advice.