Results 1 to 5 of 5

Thread: Is This Possible (urgent!)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Posts
    4

    Exclamation

    Hi,

    I am trying to store an object in a file. Is this possible?

    Dim objTemp As Object

    Set objTemp = CreateObject("Something.something")

    objTemp.DoSomething
    objTemp.DoSomethingelse


    now, before I do "Set objTemp = Nothing" I want to store objTemp to a file so I can load back up the same instance of my dll and continue using it. Any ideas on how to do that... both storing, and while you're at it, loading back up? Thanks

    Tim

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    New York City
    Posts
    73
    I'm not sure I understand what you are trying to do. Are you trying to store certain properties of the class? If so, you can use the PropertyBag object.

    Regards,

    Rich

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Posts
    4
    Hi,

    no... I've used the property bag before. I'm referring to something slightly different. I'm creating an instance of a COM dll.

    Dim objTemp As Object

    Set objTemp = CreateObject("something.something")

    now I will do some methods on that dll.
    after that I want to be able to somehow store the instance of this dll. writing the object (objTemp) somehow to a binary file would be best for my application, but I'm not sure its possible. if I could do that I could at a later date suck back in the object (instance of the COM dll) for further use. any ideas?

    Tim

  4. #4
    New Member
    Join Date
    Dec 2000
    Posts
    2

    Smile

    for some reason i dont think that what you are trying to do is actually possible. however, i can think of a way to work around this. save your method values or whatever to some physical file before you destroy the object. then the next time you need to use that type of object you can "suck" those values into that object. you cannot (i don't think) instantiate an object, save the actual object for later use and destroy it.. then "suck" it back into the same exact state it was in before you destroyed it.. once its destroyed, its destroyed.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Posts
    4
    I was afraid of that :\

    I was trying to get away from actually storing each item in a data file, but I figured it was probably the only way.

    Is there a way in C++? I thought I heard of something that allowed you to dump your dll instance from memory to a file. I could be fantasizing, though. Thanks


    Tim


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