Jump to content
  • Advertisement
Sign in to follow this  
Endemoniada

ShellExecuteEx Problem

This topic is 2878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

I am doing something like this:

void Func()
{
// this runs a cmd.exe program (ffmpeg)
ShellExecuteEx(&execInfo);

if(execInfo.hProcess != NULL){
WaitForSingleObject(execInfo.hProcess,INFINITE);
CloseHandle(execInfo.hProcess);
}
}

for(i=0;i<count;i++){
Func();
}

The problem is that sometimes the program (ffmpeg) fails which halts everything and pops open the windows (7) application failure dialog; nothing will happen until I close that dialog, making my automation kinda useless.

What can I do ?

Share this post


Link to post
Share on other sites
Advertisement
First thing that comes to mind would be to hook the process as a debugger (using DebugActiveProcess most likely) and trap the crash event yourself, and silently ignore it (or, better, log the error someplace for later review).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!