Opening movie file with a program within a program?

What I mean is, is it possible to open a .wav or whatever with the users default video player. Like this:

 
OpenFile(movie.wav, defaultProgram);


DefaultProgram probably being some winApi code. This program would be used on windows, so I am not worried about cross platform.
I have found out about ShellExecute, but it gives me this error:

1
2
#define ShellExecute ShellExecuteA
Error: Identifier "ShellExecuteA" is undefined


This is the code I am trying to call, with #include <shellAPI>:

 
ShellExecute(NULL, L"open", pathToVideo, NULL, NULL, SW_SHOW);
Last edited on
Topic archived. No new replies allowed.