Process.Start return value

  • Thread starter Thread starter Manfred Braun
  • Start date Start date
M

Manfred Braun

Hi All,

the Process.Start method returns a boolean value to indicate, if a process
was started or not. Where can I obtain more detailed error information, if
the process could not be started [for example:not enough memory or such
errors]??? It seems to be possible, that a Win32Exception will be thrown.
Will this give me this reason ["ErrorCode"], if the process cannot be
started? The docs looks a little vage for me.

Thanks in advance,
Manfred Braun

(Private)
Mannheim
Germany

mailto:[email protected]
(Remove the anti-spam-x's to mail me!)
 
The Start() method returns false if an existing process resourceis being
reused. This is not a notification for an error.
In case of an error, many exceptions could be thrown (most probably
Win32Exception as you noticed).
The NativeErrorCode member of that class will give you the Win32 error code
associated with the error.
Looking into the SDK docs will give you a description for each error code.
 
Hello,

thanks for your reply!

Now I assume - because I always create new process resources - Start()
should always return true and for errors, I have to expect a Win32Exception.

Thanks and best regards,
Manfred

Francois Bonin said:
The Start() method returns false if an existing process resourceis being
reused. This is not a notification for an error.
In case of an error, many exceptions could be thrown (most probably
Win32Exception as you noticed).
The NativeErrorCode member of that class will give you the Win32 error code
associated with the error.
Looking into the SDK docs will give you a description for each error code.

Manfred Braun said:
Hi All,

the Process.Start method returns a boolean value to indicate, if a process
was started or not. Where can I obtain more detailed error information, if
the process could not be started [for example:not enough memory or such
errors]??? It seems to be possible, that a Win32Exception will be thrown.
Will this give me this reason ["ErrorCode"], if the process cannot be
started? The docs looks a little vage for me.

Thanks in advance,
Manfred Braun

(Private)
Mannheim
Germany

mailto:[email protected]
(Remove the anti-spam-x's to mail me!)
 
Exact
Manfred Braun said:
Hello,

thanks for your reply!

Now I assume - because I always create new process resources - Start()
should always return true and for errors, I have to expect a
Win32Exception.

Thanks and best regards,
Manfred

Francois Bonin said:
The Start() method returns false if an existing process resourceis being
reused. This is not a notification for an error.
In case of an error, many exceptions could be thrown (most probably
Win32Exception as you noticed).
The NativeErrorCode member of that class will give you the Win32 error code
associated with the error.
Looking into the SDK docs will give you a description for each error
code.

Manfred Braun said:
Hi All,

the Process.Start method returns a boolean value to indicate, if a process
was started or not. Where can I obtain more detailed error information, if
the process could not be started [for example:not enough memory or such
errors]??? It seems to be possible, that a Win32Exception will be thrown.
Will this give me this reason ["ErrorCode"], if the process cannot be
started? The docs looks a little vage for me.

Thanks in advance,
Manfred Braun

(Private)
Mannheim
Germany

mailto:[email protected]
(Remove the anti-spam-x's to mail me!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top