Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecuteAndWait problem
Message
De
05/12/2001 11:36:47
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Fonctions API de Windows
Titre:
ExecuteAndWait problem
Divers
Thread ID:
00589912
Message ID:
00589912
Vues:
54
Hello everybody,
Here is the code of ExecuteAndWait
Public Sub ExecuteAndWait(cmdline$)
Dim NameOfProc As PROCESS_INFORMATION
Dim NameStart As STARTUPINFO
Dim X As Long

NameStart.cb = Len(NameStart)
X = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS,
0&, 0&, NameStart, NameOfProc)
X = WaitForSingleObject(NameOfProc.hProcess, INFINITE)
X = CloseHandle(NameOfProc.hProcess)
End Sub
This function works correctly. The problem appears when the command line you pass to this function contains gaps,
then this function doesn't function at all. examples of the command line you pass that doesn't work:
C:\WINNT\system32\UNIX2DOS.EXE C:\Documents and Settings\Elharissa Robert\Desktop\samples\cmt.rte
the problem is the gaps in Document and setting.
Can any body point me in the right direction?
Thanks
Robert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform