Skip to content

Clarify documentation of Process.Start return value #10664

Open
@tmat

Description

@tmat

Description

Current documentation:

The return value true indicates that a new process resource was started. If the process resource specified by the FileName member of the StartInfo property is already running on the computer, no additional process resource is started. Instead, the running process resource is reused and false is returned.

This is generally not true. If UseShellExecute is false (or on Unix where UseShellExecute is ignored), Start will never return false.
If UseShellExecute is true Start may return false if a new process isn't created... as the ShellExecuteEx docs call out:

hProcess will be NULL if no process was launched. For example, if a document to be launched is a URL and an instance of Internet Explorer is already running, it will display the document. No new process is launched, and hProcess will be NULL.

Reproduction Steps

n/a

Expected behavior

n/a

Actual behavior

n/a

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions