Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OpenProcess in .net

Posted on 2004-07-30
5
Medium Priority
?
659 Views
Last Modified: 2008-03-10

For vb.net, What is the equivalent of calling OpenProcess in vb
For vb.net, what is the equivalent of calling GetExitCodeProcess


0
Comment
Question by:kamleshmistry
  • 2
  • 2
5 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11681891
you can use the process object in System.Diagnostics to do this ...
0
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 1960 total points
ID: 11681916
Hi there,
1) >>"What is the equivalent of calling OpenProcess "<<
           Dim process1 As System.Diagnostics.Process
           Process.Start("Notepad.exe")

2) >>"what is the equivalent of calling GetExitCodeProcess"<<
          Process.ExitCode

Useful Links for you:
http://www.dotnetspider.com/Technology/KBPages/394.aspx
http://www.devx.com/dotnet/Article/7914
0
 

Author Comment

by:kamleshmistry
ID: 11682022

I found process.start
but not
process.exitcode
0
 

Author Comment

by:kamleshmistry
ID: 11682036
Never mind...  I got it...
thanks...
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11682050
actually openprocess connects to an existant process it does NOT start one  ... which the process object can also do ...

to get the exit code ... you would waitforexit() and then use the error code property
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Screencast - Getting to Know the Pipeline
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question