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. C / C++ / MFC
  4. ProcessShellCommand () crashes after migrating an application which was originally written in VC 6.0 to VS2010

ProcessShellCommand () crashes after migrating an application which was originally written in VC 6.0 to VS2010

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++performance
9 Posts 4 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.
  • V Offline
    V Offline
    V K 2
    wrote on last edited by
    #1

    We have migrated our application which was written in VC 6.0 to VS2010. The application crashes on launching it. The crash occurs at ProcessShellCommand( ). On debugging got this error "Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98" What could be the problem and possible fix for this. Thanks in Advance.

    L D J 3 Replies Last reply
    0
    • V V K 2

      We have migrated our application which was written in VC 6.0 to VS2010. The application crashes on launching it. The crash occurs at ProcessShellCommand( ). On debugging got this error "Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98" What could be the problem and possible fix for this. Thanks in Advance.

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

      V K 2 wrote:

      What could be the problem

      The problem is that you are trying to use an arguement that the function will not accept.

      V K 2 wrote:

      possible fix for this

      One possible fix is to use an argement that the function will accept.

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      L 1 Reply Last reply
      0
      • L Lost User

        V K 2 wrote:

        What could be the problem

        The problem is that you are trying to use an arguement that the function will not accept.

        V K 2 wrote:

        possible fix for this

        One possible fix is to use an argement that the function will accept.

        Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

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

        Sheer poetry. :laugh:

        speaking as ...

        L 1 Reply Last reply
        0
        • V V K 2

          We have migrated our application which was written in VC 6.0 to VS2010. The application crashes on launching it. The crash occurs at ProcessShellCommand( ). On debugging got this error "Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98" What could be the problem and possible fix for this. Thanks in Advance.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          V K 2 wrote:

          The crash occurs at ProcessShellCommand( ).

          Which is called how?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

          V 1 Reply Last reply
          0
          • D David Crow

            V K 2 wrote:

            The crash occurs at ProcessShellCommand( ).

            Which is called how?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            V Offline
            V Offline
            V K 2
            wrote on last edited by
            #5

            CCommandLineInfo cmdInfo; ParseCommandLine( cmdInfo ); // Dispatch commands specified on the command line if( !ProcessShellCommand( cmdInfo ) ) return FALSE;

            D 1 Reply Last reply
            0
            • L Lost User

              Sheer poetry. :laugh:

              speaking as ...

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

              We can but try.... :)

              Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

              1 Reply Last reply
              0
              • V V K 2

                CCommandLineInfo cmdInfo; ParseCommandLine( cmdInfo ); // Dispatch commands specified on the command line if( !ProcessShellCommand( cmdInfo ) ) return FALSE;

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                Have you stepped into ProcessShellCommand() (to find the statement that is throwing the exception)?

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                V 1 Reply Last reply
                0
                • D David Crow

                  Have you stepped into ProcessShellCommand() (to find the statement that is throwing the exception)?

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                  V Offline
                  V Offline
                  V K 2
                  wrote on last edited by
                  #8

                  It crashes at EnterCriticalSection in below function of C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\afxcrit.cpp void AFXAPI AfxLockGlobals(int nLockType) { ---- ---- // lock specific resource EnterCriticalSection(&_afxResourceLock[nLockType]); ----- }

                  1 Reply Last reply
                  0
                  • V V K 2

                    We have migrated our application which was written in VC 6.0 to VS2010. The application crashes on launching it. The crash occurs at ProcessShellCommand( ). On debugging got this error "Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98" What could be the problem and possible fix for this. Thanks in Advance.

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    V K 2 wrote:

                    What could be the problem and possible fix for this.

                    A bug in your code probably caused by the migration itself. Keep in mind also that although the crash originates from that call that doesn't not insure that the cause is specifically there. Pointer bugs can cause problems long after the problem code was executed.

                    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