Running win32 applications from c++ source.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Two questions. The first and one more likely to be answered is

Can you call/run a Windows executable file from within C++ source code? The executable itself runs in a DOS window and asks for user input, i.e. choose 1 to use an audio stream, 2 to read from a file, and 0 to exit. If 2 is selected a file name and path is required. I'd like to know if it is also possible to supply these parameters through the interface program as opposed to directly into the called external program

The second question is about whether anyone has experience with the MAMI audio library. Its primary use is for melody retrieval but this demo (the executable in question) at least allows Wave file to MIDI conversion. Does anyone have a list of the proceedure names and/or functions as the provided documentation is very threadbare

Thanks.
 
Alan Dunne said:
Can you call/run a Windows executable file from within
C++ source code? The executable itself runs in a DOS
window and asks for user input, i.e. choose 1 to use an
audio stream, 2 to read from a file, and 0 to exit. If 2 is
selected a file name and path is required. I'd like to know
if it is also possible to supply these parameters through
the interface program as opposed to directly into the
called external program.

Well, you don't "call" an executable. What you do is call a function in the
operating system which launches the executable. Check the docs for
CreateProcess(), ShellExecute() or system().

If you choose CreateProcess() then you can choose to redirect the target's
input away from the console to a "pipe" that you create. When the target
needs to read from its input device you shove characters down the pipe. It's
hokey, it smacks of *nix, but it works. You can go here for the details:

http://support.microsoft.com/?id=190351
The second question is about whether anyone
has experience with the MAMI audio library.

If noone repsonds here try the multimedia group

microsoft.public.win32.programmer.mmedia

Regards,
Will
 
Back
Top