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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to debug the com ???

how to debug the com ???

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++questioncomdebugging
5 Posts 3 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.
  • L Offline
    L Offline
    Leesen
    wrote on last edited by
    #1

    hi,all I write a COM Dll in Visual ATL . And I refer the COM dll in VB environment. The vb program runs well except when the program exit, the error dialog occur. The error info are such as "the address can't read ..." . Is it concerns with the c++ pointer ??? But how can I find the actuall false?? Are there any tools to help to debug the com dll?? The problem disturb me for very long time . Ask for your help , please ! Regards.

    A R 2 Replies Last reply
    0
    • L Leesen

      hi,all I write a COM Dll in Visual ATL . And I refer the COM dll in VB environment. The vb program runs well except when the program exit, the error dialog occur. The error info are such as "the address can't read ..." . Is it concerns with the c++ pointer ??? But how can I find the actuall false?? Are there any tools to help to debug the com dll?? The problem disturb me for very long time . Ask for your help , please ! Regards.

      A Offline
      A Offline
      Alvaro Mendez
      wrote on last edited by
      #2

      Leesen wrote: Are there any tools to help to debug the com dll?? Sure, just debug the DLL inside the Visual C++ debugger. Set the DLL's project as the "Active" one and then in the Settings, use your VB app as the "Executable for the debug session". When your app exits, the debugger should take you to where the problem is occurring. Good luck! Alvaro


      Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)

      L 1 Reply Last reply
      0
      • L Leesen

        hi,all I write a COM Dll in Visual ATL . And I refer the COM dll in VB environment. The vb program runs well except when the program exit, the error dialog occur. The error info are such as "the address can't read ..." . Is it concerns with the c++ pointer ??? But how can I find the actuall false?? Are there any tools to help to debug the com dll?? The problem disturb me for very long time . Ask for your help , please ! Regards.

        R Offline
        R Offline
        Renjith Ramachandran
        wrote on last edited by
        #3

        debug your ATL com with VC++ degugger and point ur executable as your vb program * * * Code the dreams * * *

        L 1 Reply Last reply
        0
        • A Alvaro Mendez

          Leesen wrote: Are there any tools to help to debug the com dll?? Sure, just debug the DLL inside the Visual C++ debugger. Set the DLL's project as the "Active" one and then in the Settings, use your VB app as the "Executable for the debug session". When your app exits, the debugger should take you to where the problem is occurring. Good luck! Alvaro


          Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)

          L Offline
          L Offline
          Leesen
          wrote on last edited by
          #4

          thx . It really do well accroding to your suggestion . But when I am in debug mode . I press "F5" to debug , the error dialog show "User breakpoint called from code at 0x77f9f9df",then the vc code change into assemble code . And in that way I can't debug further. And how ??

          1 Reply Last reply
          0
          • R Renjith Ramachandran

            debug your ATL com with VC++ degugger and point ur executable as your vb program * * * Code the dreams * * *

            L Offline
            L Offline
            Leesen
            wrote on last edited by
            #5

            hi, thx. I can debug the com dll following your advice. Because just when my vb program exit the errors occurrs, I set breakpoints in destructor function . Then when I exit the vb program ,it seemed the program did not execute the destructor code. It did not pause on the breakpoints,instead there showed a error dialog "Unhandled exception in P2P.exe : Access Violation". If I direct run the vb program without the debug mode , when I exit the vb program I will receive such error message"the memory address can't be read..." why?? I am exhausting now after so much try. thx. regards.

            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