Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equivalent to EXTPROCESS

Status
Not open for further replies.

adimulam

Programmer
Feb 13, 2002
25
US
Hi All,

I am converting one of VB 6 apps to .Net. This application gets called by DOS. Application sends return code to dos. How can I do the same in VB .Net? The code in VB 6 looks as shown below.

Dim VarData as integer
Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)

If VarData= 1 then
ExitProcess (1&)
end if
 

Try using System.Environment.ExitCode property, System.Environment.Exit() method and System.Diagnostics.Process class to accomplish your task.

Hope it helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top