|
-
July 22nd, 1999, 05:53 AM
#1
Reading VC++ Serialized data using VB
Hello,
Does anyone know if its possible to use VB to read files that have been created using the Serialize mechanism provided in VC++?
Neil
-
July 22nd, 1999, 09:24 AM
#2
Re: Reading VC++ Serialized data using VB
Sure, but the VB programmer would need to know what data structures were serialized in VC++.
-
July 22nd, 1999, 10:34 AM
#3
Re: Reading VC++ Serialized data using VB
Exactly my point. I'm not asking whether the VB language provides the facilities to read a binary file from disk - virtually any language will allow you to do that. I want to know if there is a higher level of support for doing this, i.e. how do I inform VB of my classes(types) - I can't just #include my header files - I suppose I have to make equivalent definitions (by hand) in VB, but even if I did that is there any support in VB for this binary file format? I doubt that there is, but there's a lot I don't know so I'm just asking the question.
Neil
-
July 30th, 1999, 11:01 AM
#4
Re: Reading VC++ Serialized data using VB
The idea I can think of ( and I know not very helpful :-( ) is to use structured storage in VC++ ( write CStructuredStorageFile class and do special handling of every object you want to serialize - write signature of object in the form of BSTRs at the beginning of your object, use hierarchy for classes that contain other classes and use OLE types so you are compatible with VB )
Perhaps the signature functionallity could be added to every object by a simple macro
DECLARE_STRUCTSTORG_SERIAL and IMPLEMENT_STRUCTSTORG_SERIAL.
Tomaz
---------------------------------------------
Tomaz Stih, B.Sc.CS [email protected]
Ob sotoccju 10 Nameco Group
SI-1000 Ljubljana http://www.nameco.com
Europe
-
July 30th, 1999, 11:58 AM
#5
Re: Reading VC++ Serialized data using VB
If I were going to do this, I would write a standard windows or activex dll in C++ to read the CArchive
file and call that dll from VB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|