RE: How can I run another application?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: skicow (anonymous_at_discussions.microsoft.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 05:16:07 -0800

Hi,

You can P/Invoke CreateProcess.

Public Declare Function CreateProcess Lib "coredll.dll" Alias "CreateProcess" (ByVal imageName As String, ByVal cmdLine As String, ByVal lpProcessAttributes As Integer, ByVal lpThreadAttributes As Integer, ByVal boolInheritHandles As Int32, ByVal dwCreationFlags As Int32, ByVal lpEnvironment As Integer, ByVal lpszCurrentDir As Integer, ByVal si As Integer, ByVal pi As Integer) As Integer

And then call it in code:

CreateProcess("App.exe","",0,0,0,0,0,0,0,0)

hth