Archived

This topic is now archived and is closed to further replies.

demonrealms

Exe in an exe...huh?

Recommended Posts

Hey, I was wondering if it was possible to make it to where in a winAPI you could also have a command line system in it. Meaning I want to have to .exe files and make so I can use one then open another. Is it possible to do this? How do I do this? thanks, Sathenzar

Share this post


Link to post
Share on other sites
I want it so you can click the button command line and it brings up that dos-window looking thing and you use Visual C#/C++ there and not win32 programming. So in other words you''d use the commands cout << "Hello, world!" << endl; and it would display it. That''s what I want. hope that helps,
sathenzar.

Share this post


Link to post
Share on other sites
Yes, it is possible.

The easy way to do it would be to pipe the user input formatted as a C++ program to the CL.EXE compiler, writing to something like C:\TEMP\TMPOUT.EXE, and then running that output file, re-directing the standard handles. This is probably just a day of work.

The harder way would be to include a C++ language parser and library, and execute the parse tree after it''s parsed. You don''t need to generate code, which makes it easier than writing a full compiler, but it''s still pretty hard.

Share this post


Link to post
Share on other sites
I dont know your application, but this is built into the VS.NET 2003 debugger. In the command window you can type a single line of code, and it executes it immediately.

Dont know that this will help you, but if they can do it, so can you...somehow.

Share this post


Link to post
Share on other sites