VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

For my DOSBox-based project, I've been trying to add the ability to use ShellExecute in order to run an external Windows program. I see that the DOSBox-x branch uses ShellExecute, and I've tried to follow its example by adding some Win32 includes to my sdlmain.cpp file. But I simply don't know enough about how to do this, and I can't make ShellExecute become a recognized identifier.

If anyone has some spare time on their hands, and is willing to let me know how to accomplish this, I'll be very grateful. I think I should be able to do this by studying the DOSBox-x code, but I've studied it a lot without figuring it out. A real programmer would probably figure this out in thirty seconds.

Reply 1 of 1, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

The answer to my own question is this: include these lines above the other "include" lines; they won't work if they're placed below the others (which explains why I couldn't make them work before I figured this out):

#include "windows.h"
#include "Shellapi.h"
#include "shell.h"