Converting VB6 PropertyBag in .NET

前端 未结 3 674
自闭症患者
自闭症患者 2021-01-22 03:45

For certain file operations we use VB6\'s PropertyBag object to convert various items to a bytearray via the Content property. We then save the bytearray as part of a binary fil

3条回答
  •  春和景丽
    2021-01-22 03:56

    You can check out Edanmo's Load and save pictures to byte arrays sample on his old VB6 sample page. It's very simple and can be used to "serialize" any object that implements IPersistStream interface like ADODB.Recordset for example. VB6's PropertyBag is using IPersistStream for objects and probably implements "custom" VT_Xxx variant-types serialization.

    Btw, Edanmo's code snippet allows you to read images stored via copy/paste to an image column of an Access grid.

提交回复
热议问题