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. General Programming
  3. ATL / WTL / STL
  4. Release COM dll crash problem (Windows 7 64bit OS)

Release COM dll crash problem (Windows 7 64bit OS)

Scheduled Pinned Locked Moved ATL / WTL / STL
announcementcomdebugginghelpquestion
9 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.
  • M Offline
    M Offline
    MrKBA
    wrote on last edited by
    #1

    I have a COM dll used by an other application (release) on Windows 7 64bit. The Debug version of dll COM works fine. But the release version causes crash. When trying to get the origin of problem (with "try...catch" )I discovered that it seems to be in the instruction below : m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); where : m_pConnection : Internal::_ConnectionPtr bstrConnectionString : _bstr_t wstrSuperUserDB, wstrSACUserPassword : std::wstring please have you any idea about this ?

    B L M 3 Replies Last reply
    0
    • M MrKBA

      I have a COM dll used by an other application (release) on Windows 7 64bit. The Debug version of dll COM works fine. But the release version causes crash. When trying to get the origin of problem (with "try...catch" )I discovered that it seems to be in the instruction below : m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); where : m_pConnection : Internal::_ConnectionPtr bstrConnectionString : _bstr_t wstrSuperUserDB, wstrSACUserPassword : std::wstring please have you any idea about this ?

      B Offline
      B Offline
      barneyman
      wrote on last edited by
      #2

      compile the release version with no optimisations, enable debug code in the compiler and linker, then debug it

      M 1 Reply Last reply
      0
      • M MrKBA

        I have a COM dll used by an other application (release) on Windows 7 64bit. The Debug version of dll COM works fine. But the release version causes crash. When trying to get the origin of problem (with "try...catch" )I discovered that it seems to be in the instruction below : m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); where : m_pConnection : Internal::_ConnectionPtr bstrConnectionString : _bstr_t wstrSuperUserDB, wstrSACUserPassword : std::wstring please have you any idea about this ?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        What is the value of m_pConnection at this point? I would suggest you add some code to check that your variables contain correct values.

        Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

        M 1 Reply Last reply
        0
        • M MrKBA

          I have a COM dll used by an other application (release) on Windows 7 64bit. The Debug version of dll COM works fine. But the release version causes crash. When trying to get the origin of problem (with "try...catch" )I discovered that it seems to be in the instruction below : m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); where : m_pConnection : Internal::_ConnectionPtr bstrConnectionString : _bstr_t wstrSuperUserDB, wstrSACUserPassword : std::wstring please have you any idea about this ?

          M Offline
          M Offline
          MrKBA
          wrote on last edited by
          #4

          sorry for the mistake I mean that the dll installed with the Installer causes crash. but the dll I just compile (debug or release version) works well. I think the problem is at this level (i'm not sure): m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); (this is using a log file) Is this related to the creation of version installer or something else ?!

          1 Reply Last reply
          0
          • L Lost User

            What is the value of m_pConnection at this point? I would suggest you add some code to check that your variables contain correct values.

            Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

            M Offline
            M Offline
            MrKBA
            wrote on last edited by
            #5

            sorry for the mistake I mean that the dll installed with the Installer causes crash. but the dll I just compile (debug or release version) works well. I think the problem is at this level (i'm not sure): m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); (this is using a log file) Is this related to the creation of version installer or something else ?!

            B 1 Reply Last reply
            0
            • B barneyman

              compile the release version with no optimisations, enable debug code in the compiler and linker, then debug it

              M Offline
              M Offline
              MrKBA
              wrote on last edited by
              #6

              sorry for the mistake I mean that the dll installed with the Installer causes crash. but the dll I just compile (debug or release version) works well. I think the problem is at this level (i'm not sure): m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); (this is using a log file) Is this related to the creation of version installer or something else ?!

              1 Reply Last reply
              0
              • M MrKBA

                sorry for the mistake I mean that the dll installed with the Installer causes crash. but the dll I just compile (debug or release version) works well. I think the problem is at this level (i'm not sure): m_pConnection->Open(bstrConnectionString, wstrSuperUserDB.c_str(), wstrSACUserPassword.c_str(), Internal::adConnectUnspecified); (this is using a log file) Is this related to the creation of version installer or something else ?!

                B Offline
                B Offline
                barneyman
                wrote on last edited by
                #7

                is it crashing *inside* that call, is m_pConnection valid, are the strings valid? What is the behaviour? COM is normally very good at letting you know, via error codes, what's wrong The installer should create no differences

                M 1 Reply Last reply
                0
                • B barneyman

                  is it crashing *inside* that call, is m_pConnection valid, are the strings valid? What is the behaviour? COM is normally very good at letting you know, via error codes, what's wrong The installer should create no differences

                  M Offline
                  M Offline
                  MrKBA
                  wrote on last edited by
                  #8

                  if we considerate that Installer not make difference , why crash only on version installer ? How know what is wrong via error codes?

                  B 1 Reply Last reply
                  0
                  • M MrKBA

                    if we considerate that Installer not make difference , why crash only on version installer ? How know what is wrong via error codes?

                    B Offline
                    B Offline
                    barneyman
                    wrote on last edited by
                    #9

                    when you find the crash, the answer will probably present it It sounds like you have a problem you'll have to debug - again, are the pointers valid, are the parameters valid? Another option is attach to the running version, either in Visual Studio, or with WinDebug, but, again, compile without optimisations, and make sure you generate PDB files

                    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