Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When can Process.Start() return null?

I have some code that starts a process by using Process.Start(ProcessStartInfo). I see from the documentation that this method can return null if an existing process is reused.

[Returns a] new Process component that is associated with the process resource, or null if no process resource is started (for example, if an existing process is reused).

What does it mean for an existing process to be reused and under what circumstances will this happen?

like image 888
fractor Avatar asked Dec 11 '14 16:12

fractor


1 Answers

This would happen if you call pass a file (not an EXE), and the file is configured to launch using DDE.

For example, this is how Office applications open files in existing instances.

like image 80
SLaks Avatar answered Oct 19 '22 07:10

SLaks