471,599 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Process.Start return value

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:xm*************@manfbraun.de
(Remove the anti-spam-x's to mail me!)
Nov 17 '05 #1
3 5783
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" <aa@bb.cc> wrote in message
news:uo*************@TK2MSFTNGP15.phx.gbl...
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:xm*************@manfbraun.de
(Remove the anti-spam-x's to mail me!)

Nov 17 '05 #2
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 [MVP]" <th*****@gmail.com> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
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" <aa@bb.cc> wrote in message
news:uo*************@TK2MSFTNGP15.phx.gbl...
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:xm*************@manfbraun.de
(Remove the anti-spam-x's to mail me!)


Nov 17 '05 #3
Exact
"Manfred Braun" <aa@bb.cc> wrote in message
news:uW**************@TK2MSFTNGP14.phx.gbl...
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 [MVP]" <th*****@gmail.com> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
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" <aa@bb.cc> wrote in message
news:uo*************@TK2MSFTNGP15.phx.gbl...
> 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:xm*************@manfbraun.de
> (Remove the anti-spam-x's to mail me!)
>
>



Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by jas | last post: by
7 posts views Thread by Samantha | last post: by
10 posts views Thread by Susan | last post: by
reply views Thread by =?Utf-8?B?Um9i?= | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.