Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Property Bag

Posted on 2004-08-12
5
Medium Priority
?
1,023 Views
Last Modified: 2008-03-10
I have some VB6 DLL's that we really want to use as is again.  The problem as is is that the DLL's use PropertyBag objects as input parameters.  I have been trying to create serializable objects that I can then load into the property bag but this does not work...or atleast it does not seem to work and they don't even really seem to be the same thing.

Does anyone have any ideas on how this can be done without editing the VB6 DLL's.  I really only want to do this as a last resourt.

Thanks,
Eric
0
Comment
Question by:egibson
  • 2
  • 2
5 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 750 total points
ID: 11783745
I think that you will find that you will continually struggle with this, since you are trying to fit a square peg into a round hole.  You could probably make it fit, but it will take a very large hammer:)

PropertyBag is VB6 is not a text object, but is a binary object.  You would need to create the exact same binary representation.  My only suggestion would be to do what you don't want to do, and that is modify the VB6 code to make your life easier in the long run.

Bob
0
 
LVL 24

Accepted Solution

by:
Justin_W earned 750 total points
ID: 11788518
One possible workaround might be to add one (or a few) utility functions to the VB6 DLL that accept more "compatible" params and create/return a PropertyBag.  Then you could use the new functions to create the right params without actually creating a PropertyBag directly.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 11788524
Another good suggestion:)  One that proves that leaving the VB6 code intact is not a good idea in this situation.

Bob
0
 
LVL 24

Expert Comment

by:Justin_W
ID: 11788617
> One that proves that leaving the VB6 code intact is not a good idea in this situation.
:) Both amusing and correct, Bob.
0
 

Author Comment

by:egibson
ID: 11854413
Well, I think I got this one worked out.  You can use the VBRUN.PropertyBag object to get the just back and forth but it is a pain.  I think the end result will be to adjust the VB6 code to take a string of XML which can then be broken down back into a property bag if you so wanted or manipulated directly.

We experimented with both approacess and they look to be about equal.  Both suck!!!

Anyways, thanks for the suggestions,
Eric
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question