Persist and Reload COM Objects via XML

Category:
ASP, HTML and XML
Type:
Classes
Difficulty:
Advanced
Author:
John Conwell

Version Compatibility: Visual Basic 6

More information:
This .dll will take an object and a file path input paramaters and create an XML file with all the property names as node elements and property values as nodes contents and save the XML file to the path input parameter. You can then pass in that same object later and the path of the existing XML file and it will load all the properties of the object with the values in the XML file. This can be used with any object, control, activeX, class, whatever. The only limitation is objects that have property values that are arrays like the ListData property of the ListBox object can not be used. This is great for persisting class objects between application sessions.

Run the project by starting the .vbg. See the readme.txt file for more information.

Note: Due to a bug in MSXML3, this project won't work if you are using MSXML3 unless you have applied service pack 1.


Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download persistcomobjects.zip