Debug VC++ dll?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    Debug VC++ dll?

    Hi,
    I am a vb.net programmer who has written a simple VC++ dll that I call from
    my vb program.
    How do you get to step into the VC code when debugging?
    I have tried putting the compiled dll into the output directory of the vb
    project.
    I have tried setting the attach attribute under C++ project properties
    debugging.
    I have made sure there is only one copy of the dll when running
    Alas no luck.
    Is there a general series of steps / checks that I should do to get this
    working?

    thanks
    Bob



  • Marcel Serour

    #2
    Re: Debug VC++ dll?

    Bob wrote:[color=blue]
    > Hi,
    > I am a vb.net programmer who has written a simple VC++ dll that I call from
    > my vb program.
    > How do you get to step into the VC code when debugging?
    > I have tried putting the compiled dll into the output directory of the vb
    > project.
    > I have tried setting the attach attribute under C++ project properties
    > debugging.
    > I have made sure there is only one copy of the dll when running
    > Alas no luck.
    > Is there a general series of steps / checks that I should do to get this
    > working?
    >
    > thanks
    > Bob
    >
    >
    >[/color]

    try putting the vb and the dll projects under the same solution

    Comment

    • Jochen Kalmbach [MVP]

      #3
      Re: Debug VC++ dll?

      Hi Bob!
      [color=blue]
      > I am a vb.net programmer who has written a simple VC++ dll that I call from
      > my vb program.
      > How do you get to step into the VC code when debugging?[/color]

      1. Open the DLL-Project in VC++.
      2. Put an break-point in the function you want to debug
      3. Select the vb(6).exe-App in the debugging settings.
      4. Start the DLL-Project => not vb(6) will fire up
      5. Open your VB-Project inside the vb-IDE
      6. Start your VB-Project

      Now when you go into the VC++ function, your first IDE will stop at the
      breakpoint.

      --
      Greetings
      Jochen

      My blog about Win32 and .NET

      Comment

      • Oleg Starodumov

        #4
        Re: Debug VC++ dll?

        [color=blue]
        > I am a vb.net programmer who has written a simple VC++ dll that I call from
        > my vb program.
        > How do you get to step into the VC code when debugging?[/color]

        Enable unmanaged debugging:

        Project properties | Configuration Properties | Debugging | Unmanaged code debugging

        Regards,
        Oleg
        [VC++ MVP]





        Comment

        • Bob

          #5
          Re: Debug VC++ dll? Solution.

          Hi ,
          Thanks to you all for contributing.
          The solution turned out to be a variation on Oleg's reply.
          Re Marcel's reply : the projects are already in the one solution.
          The extra pieces of the puzzle are:
          1) Point the C++ Project working directory to the VB Project (exe) output
          directory c:\blah\bin(Pro j,Config, Debug,Working)
          2) Set Attach to yes (same path as above)
          3) Set unManaged code debugging in the VB project as per Oleg's reply.
          regards
          bob
          "Bob" <bob@nowhere.co m> wrote in message
          news:eQEtop6dFH A.3616@TK2MSFTN GP09.phx.gbl...[color=blue]
          > Hi,
          > I am a vb.net programmer who has written a simple VC++ dll that I call[/color]
          from[color=blue]
          > my vb program.
          > How do you get to step into the VC code when debugging?
          > I have tried putting the compiled dll into the output directory of the vb
          > project.
          > I have tried setting the attach attribute under C++ project properties
          > debugging.
          > I have made sure there is only one copy of the dll when running
          > Alas no luck.
          > Is there a general series of steps / checks that I should do to get this
          > working?
          >
          > thanks
          > Bob
          >
          >
          >[/color]


          Comment

          Working...