CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Posts
    2

    DAO asserts in a DLL's ExitInstance()



    I have a regular DLL that uses DAO. MFC documentation indicates that DaoAfxTerm() needs to be called in the DLL's CWinApp::ExitInstance() to correctly de-initialize the DAO. However, doing so causes as assertion and ultimately a crash from within DaoAfxTerm(). MSDN documentation claims that this bug was fixed but apparently not. I was able to overcome this bug by creating a CDaoWorkspace in my client but that's not quite acceptable since my client will not be an MFC app.


    Anybody ever came across this issue? Any hints?


    Cheers,

    Yazan Diranieh

  2. #2
    Join Date
    Apr 1999
    Posts
    32

    Re: DAO asserts in a DLL's ExitInstance()



    No, it doesn't. If you check the help again, it says



    "In regular DLLs, call AfxDaoTerm before the ExitInstance function, but after all MFC DAO objects have been destroyed."



    Note, before and not in. That might solve your problem.



  3. #3
    Join Date
    Mar 1999
    Posts
    2

    Re: DAO asserts in a DLL's ExitInstance()



    Daren,


    That did solve the problem. Thanks for replying!!


    I was calling AfxDaoTerm() as follows:


    int CTestDLLApp::ExitInstance()

    {

    AfxDaoTerm();

    return CWinApp::ExitInstance();

    }


    Cheers,

    Yazan

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

Featured