Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. ADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation'

ADO and 'Unhandled exception in <application> (MSDART.DLL) 0xC0000005: Access Violation'

Scheduled Pinned Locked Moved Database
databasehelpsharepointcomannouncement
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KalliMan
    wrote on last edited by
    #1

    Hi, I'm trying to create an extension dll that references a database via ADO, using VC 6(SP 5). The problem comes when the application is exited and it prints the following error: 'Unhandled exception in (MSDART.DLL) 0xC0000005: Access Violation' This happened two times. Once when i try to release 'Connection' or 'Recordet', second after my dll's db's class destructor, if i comment Releasing. I was trying with three Mdacs. 2.7,2.7SP1, and 2.8. with 2 OSs. 2k(SP4) and XP(SP1) but none of them resolved my problem. I'm Sure that 'CoUninitialize' wasn't called before releasing, becouse if I call "CoInitialize" ,before releasing, the return value is "S_FALSE", which mean "The COM library is already initialized on this apartment". I'll be glad to see any ideas and pointers. Best Regards: KalliMan. a

    S 1 Reply Last reply
    0
    • K KalliMan

      Hi, I'm trying to create an extension dll that references a database via ADO, using VC 6(SP 5). The problem comes when the application is exited and it prints the following error: 'Unhandled exception in (MSDART.DLL) 0xC0000005: Access Violation' This happened two times. Once when i try to release 'Connection' or 'Recordet', second after my dll's db's class destructor, if i comment Releasing. I was trying with three Mdacs. 2.7,2.7SP1, and 2.8. with 2 OSs. 2k(SP4) and XP(SP1) but none of them resolved my problem. I'm Sure that 'CoUninitialize' wasn't called before releasing, becouse if I call "CoInitialize" ,before releasing, the return value is "S_FALSE", which mean "The COM library is already initialized on this apartment". I'll be glad to see any ideas and pointers. Best Regards: KalliMan. a

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      I'm sure there's something in the MSKB about this or related issues; something to do with what you can and can't call from the DLL termination function. It sounds like a dependency problem, trying to unload yours after MSDART unloads or something similar... Steve S

      K 1 Reply Last reply
      0
      • S Steve S

        I'm sure there's something in the MSKB about this or related issues; something to do with what you can and can't call from the DLL termination function. It sounds like a dependency problem, trying to unload yours after MSDART unloads or something similar... Steve S

        K Offline
        K Offline
        KalliMan
        wrote on last edited by
        #3

        Hi Steve, Thanks for your advice, but after 3 days search on net I could not find anything which may help me. I found that I'm not the first with this problem, too. see 'http://forums.devshed.com/t36005/s.html'. Same problem, but no answer. I cannot unload "MSDART.dll" before mine, because it's a SYSTEM dll.I have no access. (I get only ACCESS Violation:))) ). I just know its description: "Microsoft Data Access - OLE DB Runtime Routines". bla bla... Has anybody some other Ideas? a

        S 1 Reply Last reply
        0
        • K KalliMan

          Hi Steve, Thanks for your advice, but after 3 days search on net I could not find anything which may help me. I found that I'm not the first with this problem, too. see 'http://forums.devshed.com/t36005/s.html'. Same problem, but no answer. I cannot unload "MSDART.dll" before mine, because it's a SYSTEM dll.I have no access. (I get only ACCESS Violation:))) ). I just know its description: "Microsoft Data Access - OLE DB Runtime Routines". bla bla... Has anybody some other Ideas? a

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          In that case, I'd be tempted to get the XP symbols and get a proper callstack for this to see where it's occurring, like in your DllMain, your app's WinMain, or whatever. I wasn't implying that YOU were unloading MSDART, just that it was being unloaded first. As a hack you might try and add a method to your DLL that allows you to cleanup any or all of your objects before you unload the DLL (if you're unloading explicitly anyway, you can put a call in to do this at that point). That would help you tell if it's related. Steve S

          K 1 Reply Last reply
          0
          • S Steve S

            In that case, I'd be tempted to get the XP symbols and get a proper callstack for this to see where it's occurring, like in your DllMain, your app's WinMain, or whatever. I wasn't implying that YOU were unloading MSDART, just that it was being unloaded first. As a hack you might try and add a method to your DLL that allows you to cleanup any or all of your objects before you unload the DLL (if you're unloading explicitly anyway, you can put a call in to do this at that point). That would help you tell if it's related. Steve S

            K Offline
            K Offline
            KalliMan
            wrote on last edited by
            #5

            I thing, i found my solution. Im my case the problem was, that I'm Using A Global DBManager's classes Variable, from DLL which Load my DB DLL. Immediatly when I make it member in each class where used, the problem DISAPPEAR, Both DLL, are "implicted Linked"(i.e. export classes with (__declspec(dllimport))). Strange, isn't it? P.S. Avrything was Clear. Evrething was Released ... . KalliMan. a

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups