Hi List,
Martin Higham provided me with part of the solution
but I still get errors when compiling. So, sorry
Martin, no postcard!
Code entered in MB is:
'----------START OF CODE SAMPLE--------
' DECLARATIONS SECTION
Type STARTUPINFO
cb As Integer
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Integer
dwY As Integer
dwXSize As Integer
dwYSize As Integer
dwXCountChars As Integer
dwYCountChars As Integer
dwFillAttribute As Integer
dwFlags As Integer
wShowWindow As smallInt
cbReserved2 As smallInt
lpReserved2 As Integer
hStdInput As Integer
hStdOutput As Integer
hStdError As Integer
End Type
Type PROCESS_INFORMATION
hProcess As Integer
hThread As Integer
dwProcessID As Integer
dwThreadID As Integer
End Type
Define NORMAL_PRIORITY_CLASS = &H20&
Define INFINITE = -1&
Declare Function CloseHandle Lib "kernel32" (hObject
As Integer) As smallint
Declare Function WaitForSingleObject Lib "kernel32"
(ByVal hHandle As Integer,ByVal dwMilliseconds As
Integer) As Integer
Declare Function CreateProcessA Lib "kernel32" (ByVal
lpApplicationName As Integer, ByVal lpCommandLine As
String, ByVal lpProcessAttributes As Integer, ByVal
lpThreadAttributes As Integer, ByVal bInheritHandles
As Integer, ByVal dwCreationFlags As Integer, ByVal
lpEnvironment As Integer, ByVal lpCurrentDirectory As
Integer, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As
Integer
declare sub ExecuteAndWait(ByVal cmdLine as string)
'Procedures section
Sub ExecuteAndWait(byVal cmdline as string)
Dim nRetVal as integer
Dim NameOfProc as Process_Information
Dim NameStart as StartUpInfo
NameStart.cb = 256
NameStart.dwFlags = 1
NameStart.wShowWindow = 0
nRetVal = CreateProcessA(0, cmdLine, 0, 0, 1,
NORMAL_PRIORITY_CLASS, 0, 0, NameStart, NameOfProc)
nRetVal = NameOfProc.hProcess
nRetVal = WaitForSingleObject(NameOfProc.hProcess,
INFINITE)
nRetVal = CloseHandle(NameOfProc.hProcess)
End Sub
'----------END OF CODE SAMPLE--------
error report:
on the line stating:
nRetVal = CreateProcessA(0, cmdLine, 0, 0, 1,
NORMAL_PRIORITY_CLASS, 0, 0, NameStart, NameOfProc)
MB reports:
Found [=] while searching for [A string constant]
on the line(s) stating:
nRetVal = CloseHandle(NameOfProc.hProcess)
End Sub
MB reports:
Found [end] while searching for [)]. Invalid or
missing argument list.
'-------------------END--------
Ok! A little help will be great, and the prize is
still open!
regards,
=====
Ing. M.F. (Milo) van der Linden
NetGIS
kvk. 30166407
ABN Amro 57.64.10.535
NL - 3437TT NIEUWEGEIN
+31(0)616598808
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.