Thanks, this should be a cool way to get the output
handles....eheh...but i really don't know howto declare CreateProcess
and use it...
This is what i do:
<StructLayout(LayoutKind.Explicit, _ CharSet:=CharSet.Auto)> _
Public Structure STARTUPINFO
Public cb As Short
Public lpReserved As String
Public lpDesktop As String
Public lpTitle As String
Public dwX As Short
Public dwY As Short
Public dwXSize As Short
Public dwYSize As Short
Public dwXCountChars As Short
Public dwYCountChars As Short
Public dwFillAttribute As Short
Public dwFlags As Short
Public wShowWindow As Short
Public cbReserved2 As Short
Public lpReserved2 As Short
Public hStdInput As Short
Public hStdOutput As Short
Public hStdError As Short
End Structure
<StructLayout(LayoutKind.Explicit, _ CharSet:=CharSet.Auto)> _
Public Structure PROCESS_INFORMATION
Public hProcess As Short
Public hThread As Short
Public dwProcessId As Short
Public dwThreadId As Short
End Structure
<StructLayout(LayoutKind.Explicit, _ CharSet:=CharSet.Auto)> _
Public Structure SECURITY_ATTRIBUTES
Public nLength As Short
Public lpSecurityDescriptor As Short
Public bInheritHandle As Short
End Structure
Private Declare Auto Function CreateProcess Lib "kernel32" _
(ByVal lpApplicationName As String, ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As SECURITY_ATTRIBUTES, _
ByVal lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles
As Integer, _
ByVal dwCreationFlags As Integer, ByVal lpEnvironment As IntPtr, _
ByVal lpCurrentDriectory As String, ByVal lpStartupInfo As STARTUPINFO,
_
ByVal lpProcessInformation As PROCESS_INFORMATION) As Integer
But i really don't know hot to create the variables and hot to call the
CreateProcess function...
I understand of this is another question....one and one and one....but
please, i think of i should be, thank you you all, very near to get my
solution.
Thanks, Stefano.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!