CreateProcess ???
-
I'm using the CreateProcess to run an application. Here's how I am calling it: if (CreateProcess(cmd, cmdline, NULL, NULL, TRUE, 0 /*CREATE_NEW_CONSOLE */, NULL, NULL, &si, &pi) != 0){ My problem is I'm passing in a command line option, but the option is NOT being sent to the application being run. The app runs and Create Process returns correctly, but the app I'm running just doesn't do what I want it to. I've looked through the MSDN definition, but I haven't found a solution. I've tried everything it suggests, but it still doesn't work, not matter what command line option I put in there. None of them get passed in. Anyone have any ideas or suggestions? Thanks!
-
I'm using the CreateProcess to run an application. Here's how I am calling it: if (CreateProcess(cmd, cmdline, NULL, NULL, TRUE, 0 /*CREATE_NEW_CONSOLE */, NULL, NULL, &si, &pi) != 0){ My problem is I'm passing in a command line option, but the option is NOT being sent to the application being run. The app runs and Create Process returns correctly, but the app I'm running just doesn't do what I want it to. I've looked through the MSDN definition, but I haven't found a solution. I've tried everything it suggests, but it still doesn't work, not matter what command line option I put in there. None of them get passed in. Anyone have any ideas or suggestions? Thanks!
-
merge the app string and the commandline string into one, put it instead of your command, set the commandline to NULL. ~RaGE();
I've already tried that as well. I've tried all the ways that MSDN suggest. When I use that method, I get an error 2, which means "The system cannot find the file specified." or ERROR_FILE_NOT_FOUND. But the file is there, and the path is correct. I also tried adding the app name to the commandline string and setting the command to NULL, as well as having the command in there as well. Any other ideas or suggestions?
-
I've already tried that as well. I've tried all the ways that MSDN suggest. When I use that method, I get an error 2, which means "The system cannot find the file specified." or ERROR_FILE_NOT_FOUND. But the file is there, and the path is correct. I also tried adding the app name to the commandline string and setting the command to NULL, as well as having the command in there as well. Any other ideas or suggestions?
-
I've already tried that as well. I've tried all the ways that MSDN suggest. When I use that method, I get an error 2, which means "The system cannot find the file specified." or ERROR_FILE_NOT_FOUND. But the file is there, and the path is correct. I also tried adding the app name to the commandline string and setting the command to NULL, as well as having the command in there as well. Any other ideas or suggestions?
-
I'm using the CreateProcess to run an application. Here's how I am calling it: if (CreateProcess(cmd, cmdline, NULL, NULL, TRUE, 0 /*CREATE_NEW_CONSOLE */, NULL, NULL, &si, &pi) != 0){ My problem is I'm passing in a command line option, but the option is NOT being sent to the application being run. The app runs and Create Process returns correctly, but the app I'm running just doesn't do what I want it to. I've looked through the MSDN definition, but I haven't found a solution. I've tried everything it suggests, but it still doesn't work, not matter what command line option I put in there. None of them get passed in. Anyone have any ideas or suggestions? Thanks!