Results 1 to 9 of 9

Thread: VB6 pipe-based UDT-serializing/deserializing InMemory

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    VB6 pipe-based UDT-serializing/deserializing InMemory

    VB6 has a nice feature, when it comes to UDTs.

    It has builtin serializing/deserializing routines, which are capable to write
    an even complex and deeply nested UDT to a File per VBs Put-statement
    (no matter whether this UDT contains dynamic members like Arrays or Strings) -
    and later on it can read this UDT back from the File it was saved to (per Get).

    Too bad, that this feature is restricted to the FileSystem (VBs Open, Put and Get calls) -
    and not exposed in a way, to make it usable InMemory (writing and reading to ByteArrays).

    The little Demo here does just that, with a little workaround (using Named-Pipes),
    which VBs Open-Statement is able to understand and deal with.

    The main-functionality sits in a little Class, named: cPipedUDTs ...
    which throws an Event which allows you, to write your UDT for serialization
    into the Pipe - and another Event for the opposite direction (the deserialization).

    Not much code - and easy to understand I think (Demo contains comments as well):
    UDTsPipeSerializing.zip

    Have fun!

    Olaf
    Last edited by Schmidt; Oct 16th, 2015 at 08:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width