473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CreateProcess

Hello, please someone have the working code on how to call the CreateProcess
API in Vb.Net?
I need to call the CreateProcess API directly and i should not use the
Vb.Net Process functions like dim MyProcess as new Process - MyProcess.Start

This is my code wich i transalated from Vb6 to Vb.Net:

<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 call the process..

Any help will be greatly appreciated.
Stefano from Italy
Nov 20 '05 #1
5 7919
* "Stefano Camaiani" <st*****@subsonic.it> scripsit:
Hello, please someone have the working code on how to call the CreateProcess
API in Vb.Net?
I need to call the CreateProcess API directly and i should not use the
Vb.Net Process functions like dim MyProcess as new Process - MyProcess.Start

This is my code wich i transalated from Vb6 to Vb.Net:

<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
Replace all 'As Short' with 'As Int32, 'bInheritHandle' can be declared
as 'Boolean', the handles (variables beginning with "h") should be
declared as 'IntPtr'.
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


The structures should be passed 'ByRef', 'bInheritHandles' can be
declared as 'Boolean'.

All untested!

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
On 2003-10-11, Stefano Camaiani <st*****@subsonic.it> wrote:
Hello, please someone have the working code on how to call the CreateProcess
API in Vb.Net?
I need to call the CreateProcess API directly and i should not use the
Vb.Net Process functions like dim MyProcess as new Process - MyProcess.Start

This is my code wich i transalated from Vb6 to Vb.Net:


<snip>

Stephano!

I'm sorry I didn't get back to you sooner... Here is a quick example of
using CreateProcess that may help you (though, I still think you should
experiment more with System.Diagnostics.Process :)... It is pretty
rough, I through it together this morning, and I was sort of in a
hurry - so don't be to rough on me :)

Option Explicit On
Option Strict On

Imports System.Runtime.InteropServices

Public Class MainForm
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Go As System.Windows.Forms.Button
Friend WithEvents Display As System.Windows.Forms.ListBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Go = New System.Windows.Forms.Button
Me.Display = New System.Windows.Forms.ListBox
Me.SuspendLayout()
'
'Go
'
Me.Go.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Go.Location = New System.Drawing.Point(296, 232)
Me.Go.Name = "Go"
Me.Go.TabIndex = 0
Me.Go.Text = "&Go"
'
'Display
'
Me.Display.Anchor =
CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Display.IntegralHeight = False
Me.Display.Location = New System.Drawing.Point(0, 0)
Me.Display.Name = "Display"
Me.Display.Size = New System.Drawing.Size(372, 228)
Me.Display.TabIndex = 1
'
'MainForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(372, 257)
Me.Controls.Add(Me.Display)
Me.Controls.Add(Me.Go)
Me.Name = "MainForm"
Me.Text = "ReadConsoleOutput"
Me.ResumeLayout(False)

End Sub

#End Region

<Flags()> _
Private Enum HANDLE_TYPES
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
STD_ERROR_HANDLE = -12
End Enum

<Flags()> _
Private Enum FILL_ATTRIBUTES
FOREGROUND_BLUE = &H1 ' text color contains blue.
FOREGROUND_GREEN = &H2 ' text color contains green.
FOREGROUND_RED = &H4 ' text color contains red.
FOREGROUND_INTENSITY = &H8 ' text color is intensified.
BACKGROUND_BLUE = &H10 ' background color contains blue.
BACKGROUND_GREEN = &H20 ' background color contains green.
BACKGROUND_RED = &H40 ' background color contains red.
BACKGROUND_INTENSITY = &H80 ' background color is intensified.
End Enum

<Flags()> _
Private Enum START_UP_INFO_FLAGS
STARTF_USESHOWWINDOW = &H1
STARTF_USESIZE = &H2
STARTF_USEPOSITION = &H4
STARTF_USECOUNTCHARS = &H8
STARTF_USEFILLATTRIBUTE = &H10
STARTF_RUNFULLSCREEN = &H20
STARTF_FORCEONFEEDBACK = &H40
STARTF_FORCEOFFFEEDBACK = &H80
STARTF_USESTDHANDLES = &H100
End Enum

<Flags()> _
Private Enum SHOW_WINDOW As Short
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
SW_MAX = 11
End Enum

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Private Structure STARTUPINFO
Public cb As Integer
Public lpReserved As IntPtr
Public lpDesktop As String
Public lpTitle As String
Public dwX As Integer
Public dwY As Integer
Public dwXSize As Integer
Public dwYSize As Integer
Public dwXCountChars As Integer
Public dwYCountChars As Integer
Public dwFillAttribute As FILL_ATTRIBUTES
Public dwFlags As START_UP_INFO_FLAGS
Public wShowWindow As SHOW_WINDOW
Public cbReserved2 As Short
Public lpReserved2 As IntPtr
Public hStdInput As IntPtr
Public hStdOutput As IntPtr
Public hStdError As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential)> _
Private Structure PROCESS_INFORMATION
Public hProcess As IntPtr
Public hThread As IntPtr
Public dwProcessId As Integer
Public dwThreadId As Integer
End Structure

Private Declare Auto Function CreateProcess Lib "kernel32" _
(ByVal lpApplicationName As String, _
ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Integer, _
ByVal lpThreadAttributes As Integer, _
ByVal bInheritHandles As Boolean, _
ByVal dwCreationFlags As Integer, _
ByVal lpEnvironment As String, _
ByVal lpCurrentDirectory As String, _
ByRef lpStartupInfo As STARTUPINFO, _
ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean

Private Declare Function CloseHandle Lib "kernel32" _
(ByVal hObject As IntPtr) As Boolean

Private Declare Function AllocConsole Lib "kernel32" () As Boolean
Private Declare Function FreeConsole Lib "kernel32" () As Boolean

Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As HANDLE_TYPES) As IntPtr

Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click
Dim StartInfo As STARTUPINFO
Dim ProcessInfo As PROCESS_INFORMATION

With StartInfo
.cb = Marshal.SizeOf(StartInfo)
.lpReserved = IntPtr.Zero
.lpDesktop = Nothing
.lpTitle = Nothing
.dwFlags = START_UP_INFO_FLAGS.STARTF_USESTDHANDLES
.hStdInput = GetStdHandle(HANDLE_TYPES.STD_INPUT_HANDLE)
.hStdOutput = GetStdHandle(HANDLE_TYPES.STD_OUTPUT_HANDLE)
.hStdError = GetStdHandle(HANDLE_TYPES.STD_ERROR_HANDLE)
End With

If CreateProcess("c:\windows\system32\cmd.exe", "/c dir c:\", 0, 0, True, 0, Nothing, Nothing, StartInfo, ProcessInfo) Then
CloseHandle(ProcessInfo.hProcess)
CloseHandle(ProcessInfo.hThread)
Else
Dim win As New System.ComponentModel.Win32Exception(Marshal.GetLa stWin32Error())
MessageBox.Show(win.Message)
End If
End Sub

Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
AllocConsole()
End Sub

Private Sub MainForm_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
FreeConsole()
End Sub
End Class

HTH
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #3
Hi Tom,
you are not only a HERO, but also a GENIUS!!!

I must pay to you thousands beers! ;)
I will try this immediately....

Really THANKS!!! I really hope to meet more people like you!

Hope to hear from you soon!

Stefano.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4
Hi Tom,
this is my code to call the CreateProcess API:

Public Function StartProcess() As Boolean
If AllocMyConsole() = True Then
Dim MyStartupInfo As STARTUPINFO
Dim MyProcessInformation As PROCESS_INFORMATION
If CreateProcess("", "Mem.exe", 0, 0, True, 0, "", "",
MyStartupInfo, MyProcessInformation) = True Then
MsgBox("Yahoo!")
Else
MsgBox("Oh-Oh...")
End If
Else
MsgBox("Error: I should not Allocate the Console!")
End If
End Function
Public Function AllocMyConsole() As Boolean
If AllocConsole Then
Return True
Else
Return False
End If
End Function

Public Function FreeMyConsole() As Boolean
If FreeConsole Then
Return True
Else
Return False
End If
Eh-eh: i receive ever the Oh-Oh message.... where i'm wrong?
THKsssssss
Stefano

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
Hello TOM, sorry for my last request, i seen your message on DevelopersDex
and your code was cutted.....now i opened it my the News and i get it
complete....
Thanks!!!!

Stefano

"Tom Shelton" <to*@mtogden.com> ha scritto nel messaggio
news:Op**************@TK2MSFTNGP11.phx.gbl...
On 2003-10-11, Stefano Camaiani <st*****@subsonic.it> wrote:
Hello, please someone have the working code on how to call the CreateProcess API in Vb.Net?
I need to call the CreateProcess API directly and i should not use the
Vb.Net Process functions like dim MyProcess as new Process - MyProcess.Start
This is my code wich i transalated from Vb6 to Vb.Net:
<snip>

Stephano!

I'm sorry I didn't get back to you sooner... Here is a quick example of
using CreateProcess that may help you (though, I still think you should
experiment more with System.Diagnostics.Process :)... It is pretty
rough, I through it together this morning, and I was sort of in a
hurry - so don't be to rough on me :)

Option Explicit On
Option Strict On

Imports System.Runtime.InteropServices

Public Class MainForm
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form

Designer 'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Go As System.Windows.Forms.Button
Friend WithEvents Display As System.Windows.Forms.ListBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Go = New System.Windows.Forms.Button
Me.Display = New System.Windows.Forms.ListBox
Me.SuspendLayout()
'
'Go
'
Me.Go.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Go.Location = New System.Drawing.Point(296, 232)
Me.Go.Name = "Go"
Me.Go.TabIndex = 0
Me.Go.Text = "&Go"
'
'Display
'
Me.Display.Anchor =
CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Display.IntegralHeight = False
Me.Display.Location = New System.Drawing.Point(0, 0)
Me.Display.Name = "Display"
Me.Display.Size = New System.Drawing.Size(372, 228)
Me.Display.TabIndex = 1
'
'MainForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(372, 257)
Me.Controls.Add(Me.Display)
Me.Controls.Add(Me.Go)
Me.Name = "MainForm"
Me.Text = "ReadConsoleOutput"
Me.ResumeLayout(False)

End Sub

#End Region

<Flags()> _
Private Enum HANDLE_TYPES
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
STD_ERROR_HANDLE = -12
End Enum

<Flags()> _
Private Enum FILL_ATTRIBUTES
FOREGROUND_BLUE = &H1 ' text color contains blue.
FOREGROUND_GREEN = &H2 ' text color contains green.
FOREGROUND_RED = &H4 ' text color contains red.
FOREGROUND_INTENSITY = &H8 ' text color is intensified.
BACKGROUND_BLUE = &H10 ' background color contains blue.
BACKGROUND_GREEN = &H20 ' background color contains green.
BACKGROUND_RED = &H40 ' background color contains red.
BACKGROUND_INTENSITY = &H80 ' background color is intensified.
End Enum

<Flags()> _
Private Enum START_UP_INFO_FLAGS
STARTF_USESHOWWINDOW = &H1
STARTF_USESIZE = &H2
STARTF_USEPOSITION = &H4
STARTF_USECOUNTCHARS = &H8
STARTF_USEFILLATTRIBUTE = &H10
STARTF_RUNFULLSCREEN = &H20
STARTF_FORCEONFEEDBACK = &H40
STARTF_FORCEOFFFEEDBACK = &H80
STARTF_USESTDHANDLES = &H100
End Enum

<Flags()> _
Private Enum SHOW_WINDOW As Short
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
SW_MAX = 11
End Enum

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Private Structure STARTUPINFO
Public cb As Integer
Public lpReserved As IntPtr
Public lpDesktop As String
Public lpTitle As String
Public dwX As Integer
Public dwY As Integer
Public dwXSize As Integer
Public dwYSize As Integer
Public dwXCountChars As Integer
Public dwYCountChars As Integer
Public dwFillAttribute As FILL_ATTRIBUTES
Public dwFlags As START_UP_INFO_FLAGS
Public wShowWindow As SHOW_WINDOW
Public cbReserved2 As Short
Public lpReserved2 As IntPtr
Public hStdInput As IntPtr
Public hStdOutput As IntPtr
Public hStdError As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential)> _
Private Structure PROCESS_INFORMATION
Public hProcess As IntPtr
Public hThread As IntPtr
Public dwProcessId As Integer
Public dwThreadId As Integer
End Structure

Private Declare Auto Function CreateProcess Lib "kernel32" _
(ByVal lpApplicationName As String, _
ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Integer, _
ByVal lpThreadAttributes As Integer, _
ByVal bInheritHandles As Boolean, _
ByVal dwCreationFlags As Integer, _
ByVal lpEnvironment As String, _
ByVal lpCurrentDirectory As String, _
ByRef lpStartupInfo As STARTUPINFO, _
ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean

Private Declare Function CloseHandle Lib "kernel32" _
(ByVal hObject As IntPtr) As Boolean

Private Declare Function AllocConsole Lib "kernel32" () As Boolean
Private Declare Function FreeConsole Lib "kernel32" () As Boolean

Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As HANDLE_TYPES) As IntPtr
Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click Dim StartInfo As STARTUPINFO
Dim ProcessInfo As PROCESS_INFORMATION

With StartInfo
.cb = Marshal.SizeOf(StartInfo)
.lpReserved = IntPtr.Zero
.lpDesktop = Nothing
.lpTitle = Nothing
.dwFlags = START_UP_INFO_FLAGS.STARTF_USESTDHANDLES
.hStdInput = GetStdHandle(HANDLE_TYPES.STD_INPUT_HANDLE)
.hStdOutput = GetStdHandle(HANDLE_TYPES.STD_OUTPUT_HANDLE)
.hStdError = GetStdHandle(HANDLE_TYPES.STD_ERROR_HANDLE)
End With

If CreateProcess("c:\windows\system32\cmd.exe", "/c dir c:\", 0, 0, True, 0, Nothing, Nothing, StartInfo, ProcessInfo) Then CloseHandle(ProcessInfo.hProcess)
CloseHandle(ProcessInfo.hThread)
Else
Dim win As New System.ComponentModel.Win32Exception(Marshal.GetLa stWin32Error()) MessageBox.Show(win.Message)
End If
End Sub

Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load AllocConsole()
End Sub

Private Sub MainForm_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed FreeConsole()
End Sub
End Class

HTH
--
Tom Shelton
MVP [Visual Basic]

Nov 20 '05 #6

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

Similar topics

2
by: Achim Domma | last post by:
Hi, I try to start a process on windows using win32process.CreateProcess and want to to redirect the output. I set the STARTF_USESTDHANDLES flag in the STARTUPINFO structure. But I can not...
6
by: david.humpherys | last post by:
os:winnt python2.3.2 I have a exe that dumps info to the command line. I want to run this process and capture the stdout into a file. I think i'm close... any help appreciated. dh...
0
by: ByteSize | last post by:
Would be grateful of advice please. I have code in VB6 working as follows: lngReply = CreateProcess(sNull, txtStart, ByVal 0&, ByVal 0&, 1&, _ NORMAL_PRIORITY_CLASS, ByVal 0&, sNull, sInfo,...
1
by: DOT NET JIM | last post by:
in VB6 the api declares the createprocess lbEnv var as any. When converted to ..NET is change the type any to Object. The problem is, what kind of object. I can not get the env variables set when...
3
by: kal | last post by:
Hi, I am trying to write an application that will launch a second application using CreateProcess... SECURITY_ATTRIBUTES sa; STARTUPINFO si; PROCESS_INFORMATION pi; ::ZeroMemory( &sa,...
2
by: Paul Schenk | last post by:
Hi All :) Would be grateful of advice please. I have code in VB6 working as follows: lngReply = CreateProcess(sNull, txtStart, ByVal 0&, ByVal 0&, 1&, _ NORMAL_PRIORITY_CLASS, ByVal 0&,...
1
by: itmanager | last post by:
I am trying to create a process at a particular set of coordinates (for example 1,1) but the CreateProcess api seemingly ignores the settings in the dwX and dwY properties of the STARTUPINFO...
1
by: Jai | last post by:
Please provide sample code for using Createprocess in VB.NET. The code I am using is given below. But I get "Error 91: Object referrence not set to an instance of the object" at CreateProcess...
6
by: ss.teo | last post by:
I want to fork a new process and my executable binary is stored inside somewhere. Is there any possible way to fork a process using CreateProcess API without writing to the disk first? Like let's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.