Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6251713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:39:55+00:00 2026-05-24T13:39:55+00:00

I have a program which crashes on the ShellExecute() instruction. If I use the

  • 0

I have a program which crashes on the ShellExecute() instruction. If I use the method system(), all works fine but I have read that system() was evil…

I’m using Visual Studio 2010 SP1.

So there is my function which calls ShellExecute:

ATC_GENERIC_API void __cdecl atcGenericLaunchGAG()
{
    HINSTANCE ret = ShellExecute( NULL, NULL, "MyExe.exe", NULL, "C:\\Opt\\", SW_SHOW );
    if( int(ret) > 32 )
    {
        //OK
        return;
    }
    //NOK
}

This is the error I have:

Unhandled exception at 0x640361c3 in Aneto Sol.exe: 0xC0000005: Access violation reading location 0x0ba29bb0.

And the debugger breaks here:

void __cdecl operator delete(void* p)
{
#if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
    _free_dbg(p, _NORMAL_BLOCK);
#else
    free(p);
#endif
}

And that is my call stack:

mfc100d.dll!operator delete(void * p)  Line 347 + 0xc bytes C++
mfc100d.dll!operator delete[](void * p)  Line 360 + 0x9 bytes C++
mfc100d.dll!CPlex::FreeDataChain()  Line 43 + 0xf bytes C++
mfc100d.dll!CMapPtrToPtr::RemoveAll()  Line 87 C++
mfc100d.dll!CMapPtrToPtr::FreeAssoc(CMapPtrToPtr::CAssoc * pAssoc)  Line 147 C++
mfc100d.dll!CMapPtrToPtr::RemoveKey(void * key)  Line 252 C++
mfc100d.dll!CHandleMap::RemoveHandle(void * h)  Line 230 C++

Is there somebody who already has had this kind of error with ShellExecute or who can explain to me why ShellExecute crashes like that ? Thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:39:55+00:00Added an answer on May 24, 2026 at 1:39 pm

    As Cory Nelson said, the error is not in the API itself, but in MFC. There might be a ShellExecute hook that causes your application to crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a calculator program which compiles fine, but crashes when I hit
I have a program that crashes (attempting to read a bad memory address) while
I have a Java program which depends on a native library that crashes randomly
I have a program which doesn't once reference System.I0, coded in vb.net, yet for
I have a program (time lapse maker) which has two threads that updates a
I have a Windows Service program running in Release mode that runs 24/7 which
I have been struggling with a program that calls functions which return strings. I
I have a WPF program that runs fine on the development PC and on
I have a program which needs to behave slightly differently on Tiger than on
I have a program which deliberately performs a divide by zero (and stores the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.