Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i start a process with arguments using the Win32 API?

Tags:

c

process

winapi

I have been googling a bit, but did not find what i was looking for.

I want to start a process with arguments(in C) using the win32 API.

Does anybody have some examples or pointers which i can use/see?

like image 245
dikidera Avatar asked Feb 23 '23 11:02

dikidera


2 Answers

The win32 CreateProcess function does what you need.

like image 129
steve Avatar answered Feb 25 '23 01:02

steve


You can also use the RTL _spawnl function to create child processes with arguments (handy if you don't need the extra stuff provided by CreateProcess, though this is not strictly WinAPI)

like image 35
Necrolis Avatar answered Feb 24 '23 23:02

Necrolis