473,883 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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****** *******@manfbra un.de
(Remove the anti-spam-x's to mail me!)
Nov 17 '05 #1
3 5942
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******** *****@TK2MSFTNG P15.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****** *******@manfbra un.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******** ******@TK2MSFTN GP14.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******** *****@TK2MSFTNG P15.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****** *******@manfbra un.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******** ******@TK2MSFTN GP14.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******** ******@TK2MSFTN GP14.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******** *****@TK2MSFTNG P15.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****** *******@manfbra un.de
> (Remove the anti-spam-x's to mail me!)
>
>



Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2966
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am starting is that it has a welcome window first which gets displayed and then the real windows after a while,in other words it means that the process name is the same, but the handle I need to retrive is the one from the final window and not the...
7
717
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
18
4902
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE) p.stdin.write("hostname\n") however, it doesn't seem to work. I think the cmd.exe is catching it.
7
3356
by: Samantha | last post by:
Hello , I am developping a program for Win98 plateform, and I am stucking with a problem, hope you can help me. I have a program running 2 process : - One process running the Xcopy.exe - When the first process is finished, it runs another Exe process (HHC.exe) The code is below:
10
15928
by: Tony | last post by:
I am running an application called AcroComm.exe to poll time clocks here at our company. I have written a small C# app that will poll the clocks based on information found in a DB. My problem is that AcroComm will sometimes stop polling in the middle of the process and terminate. The programing manual for the app says that it sends a code to the operating system when it is done that tells what has happend like the following: 0 ...
0
6766
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course (1.1 does not support running a process as a different user). I'm running everything on Windows Server 2003. I have impersonation enabled in my web.config, and I'm using Integrated authentication on the IIS virtual directory that this aspx is in....
10
2194
by: Susan | last post by:
I have a process that takes a while to run so I have it running asynchronously so that the user can continue working. My question is that I want to killl the process if the user changes the search parameters before the callback method is called. Any ideas of how to do this or if it even matters? I did not know if calling the asynch process a new time kills the previous one or not. Thank you for your help. Susan
3
4044
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user selects? thanks...
0
1739
by: =?Utf-8?B?Um9i?= | last post by:
I've a requirement to monitor when certain applications are started. I'm using WMI called from VS Stusio 2005 in VB to trap Excel and Word starting. I've written the following console application which wires up 4 events to trap Excel/Word Start/Stop events. The application works fine for Excel but Word behaves strangely. When I start an instance of Word I get the correct message displayed in the console. When I start a second instance of...
0
9942
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10848
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10417
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9575
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7972
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5798
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5992
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3234
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.