zos_createprocess
Podíjte se, prosím Vás, na funkci CreateProcess
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa
Zkuste si maly program, ktery spousti notepad.exe s parametrem pokus.txt
#include <iostream> #include <windows.h> using namespace std; int main (int argc, char * * argv) { cout << "Start" << endl; STARTUPINFO startup; memset (&startup, 0, sizeof (startup)); PROCESS_INFORMATION info; BOOL ok = CreateProcess ( NULL, // LPCTSTR lpApplicationName, "notepad pokus.txt", // LPTSTR lpCommandLine, NULL, // LPSECURITY_ATTRIBUTES lpProcessAttributes, NULL, // LPSECURITY_ATTRIBUTES lpThreadAttributes, FALSE, // BOOL bInheritHandles, 0, // DWORD dwCreationFlags, NULL, // LPVOID lpEnvironment, "c:\\work", // LPCTSTR lpCurrentDirectory, & startup, // LPSTARTUPINFO lpStartupInfo, & info // LPPROCESS_INFORMATION lpProcessInformation ); return 0; }
Zde je kompletni program Create Process
zos_createprocess.txt · Last modified: 2020/03/26 15:33 by 127.0.0.1