Cmndline args with CreateProcess

Cmndline args with CreateProcess

Bild des Benutzers richpauir

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))

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers james@elementyl.com

Try replacing command.com with edit.com.

James

Bild des Benutzers Steve Lionel (Intel)

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

Steve
Bild des Benutzers richpauir

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. :)

Melden Sie sich an, um einen Kommentar zu hinterlassen.