Facing problem in loading data from CArchive in VCDotNet.

Discussion in 'ASP .Net' started by Konark Khera, Mar 22, 2005.

  1. Konark Khera

    Konark Khera Guest

    While Loading the data from "CArchive >> Operator" my application crashes.

    Following is the class hierarchy of my application, and the various things
    that i debugged:

    Class B is the base class and there are two classes derived from it Class D1
    and Class D2.
    I serialze the data of class D1 through the "CArchive << operator" and when
    i try to load it through the "CArchive >> operator" it fails.
    When we save the data through CArchive << operator, it stores the class name
    i.e D1 before the member variables of this class that we serialized, so that
    when we load it, it should be able to create the object of classD1 and would
    be able to retrieve the data.

    I debugged the following and found out that there is an AFX_MODULE_STATE of
    the application that stores all the runtime classes of the application. The
    CArchive >> operator reads the class name and matches it with all the
    runtime classes present in AFX_MODULE_STATE application pointer. The
    AFX_MODULE_STATE pointer of my application did not have any runtime classes
    in it and that is why it failed.

    When I debugged further, I found that if I load an Extension Dll at runtime
    through LoadLibrary it corrupts the module state of my application and if I
    try to retrieve the data after that, my application crashes.

    Has anyone of you faced a similar kind of a problem. The same scenario works
    fine in VC6.

    Can anyone help me on this,

    Thanks,
    Konark
     
    Konark Khera, Mar 22, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anubhav Jain
    Replies:
    0
    Views:
    452
    Anubhav Jain
    Mar 20, 2006
  2. facing a problem

    , Dec 26, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    409
    =?Utf-8?B?U2h5YW0gUmVtZWxsYQ==?=
    Dec 27, 2003
  3. Amratash
    Replies:
    0
    Views:
    530
    Amratash
    Apr 13, 2004
  4. Hema S via DotNetMonster.com

    Facing Session Timeout problem

    Hema S via DotNetMonster.com, Apr 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    400
    Brock Allen
    Apr 21, 2005
  5. Mark
    Replies:
    1
    Views:
    357
    SaltPeter
    Jul 2, 2004
Loading...

Share This Page