Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Cmndline args with CreateProcess

richpauir
Beginner
1,025 Views
I'm trying to spawn the MS-DOS Editor with CreateProcess. How do I include the argument 'edit' in my call to CreateProcess? The MS-DOS Editor is normally opened by typing 'edit' at the DOS command prompt.

This is my code:
bret = CreateProcess(NULL, 'command.com'C, NULL, NULL,
FALSE, IOR(CREATE_DEFAULT_ERROR_MODE,NORMAL_PRIORITY_CLASS),
NULL, NULL, loc(si), loc(pi))
0 Kudos
3 Replies
james1
Beginner
1,025 Views
Try replacing command.com with edit.com.

James
0 Kudos
Steven_L_Intel1
Employee
1,025 Views
Any particular reason why you want to use that editor?

I would suggest instead using ShellExecute and the "Edit" verb. (However, you can't wait for the editor to finish this way.)

Steve
0 Kudos
richpauir
Beginner
1,025 Views
Thanks guys.

Steve, my boss likes the MS-DOS Editor to create formatted input files for his Fortran console applications. It's a little old-school, but he's the boss. :)
0 Kudos
Reply