[foxboro] AW: Visual basic

Hi,

You can call up a new Process(command shell "cmd" or iccdrvr.tsk.exe for
example) using the winapi function:
CreateProcessA()
Then wait for it to finish:
WaitForSingleObject()=20
And don=B4t forget to close the handle ;)
CloseHandle ()

They are declared in kernel32.lib and need to be implemented like this:

Public Declare Function WaitForSingleObject Lib "kernel32" _
    (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long

Public Declare Function CreateProcess Lib "kernel32" Alias _
    "CreateProcessA" (ByVal lpApplicationName As String, ByVal _
    lpCommandLine As String, lpProcessAttributes As Any, _
    lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal _
    dwCreationFlags As Any, lpEnvironment As Any, ByVal _
    lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, _
    lpProcessInformation As PROCESS_INFORMATION) As Long

Public Declare Function CloseHandle Lib "kernel32" _
    (ByVal hObject As Long) As Long

Have fun!

Best Regards,
------------------------
Daniel Weinbrenner
Process Automation and=20
Software Development
=20
Erpicon software development GmbH
Neusser Str. 724- 726
50737 K=F6ln =B7 Germany
Tel: +49 (0)221 97460 - 65
Fax: +49 (0)221 97460 =96 99
e-mail: dweinbrenner@xxxxxxxxxx

Internet: www.erpicon.de
Gesch=E4ftsf=FChrer: Dirk Betzner
Registergericht: K=F6ln HRB 23985
=20
--
Die Information in dieser eMail ist vertraulich und kann dem =
Berufsgeheimnis
unterliegen. Sie ist ausschliesslich fuer den Adressaten bestimmt. =
Jeglicher
Zugriff auf diese eMail durch andere Personen als den Adressaten ist
untersagt. Sollten Sie nicht der fuer diese eMail bestimmte Adressat =
sein,
ist Ihnen jede Veroeffentlichung, Vervielfaeltigung oder Weitergabe wie =
auch
das Ergreifen oder Unterlassen von Massnahmen im Vertrauen auf erlangte
Information untersagt.

The information in this email is confidential and may be legally =
privileged.
It is intended solely for the addressee. Access to this email by anyone =
else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in =
reliance
on it, is prohibited and may be unlawful.
=20
=20
=20
-----Urspr=FCngliche Nachricht-----
Von: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] =
Im
Auftrag von Mostafa mohamed
Gesendet: Saturday, May 17, 2008 12:10 PM
An: foxboro@xxxxxxxxxxxxx
Betreff: [foxboro] Visual basic

Dear All
Does any one Know how to execute pref,  iccdrvr.tsk, and script commands
from visual basic environment. RegardsMostafa
_________________________________________________________________
Change the world with e-mail. Join the i=92m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=3DEML_WL_ChangeW=
orld
=20
=20
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
=20
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
to unsubscribe:      =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
=20

 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: