D
Hallo mal wieder,
jetzt hat sich da etwas ergeben:
Ich habe folgenden VB Code:
Public Function ShellX( _
ByVal PathName As String, _
Optional ByVal WindowStyle As VbAppWinStyle = vbMinimizedFocus, _
Optional ByVal Events As Boolean = True _
) As Long
'Deklarationen:
Const STILL_ACTIVE = &H103&
Const PROCESS_QUERY_INFORMATION = &H400&
Dim ProcId As Long
Dim ProcHnd As Long
'Prozess-Handle holen:
ProcId = Shell(PathName, WindowStyle)
ProcHnd = OpenProcess(PROCESS_QUERY_INFORMATION, True, ProcId)
'Auf Prozess-Ende warten:
Do
If Events Then DoEvents
GetExitCodeProcess ProcHnd, ShellX
Loop While ShellX = STILL_ACTIVE
'Aufräumen:
CloseHandle ProcHnd
End Function
Eine von mir erstellte EXE wird an einer anderen Stelle erfolgreich ausgeführt und arbeitet auch richtig!
ShellX("S:\******\uebergabe.exe " & pfad1 & " " & pfad2 & " " & strIP & " false", vbHide)
Also, wie gesagt, das ganze funktioniert sehr gut!
Jetzt aber folgendes Problem:
Die "SHELLX" bekommt den Returnwert der uebergabe.exe nicht zugewiesen!
Was fehlt mir, damit die "Main" der uebergabe.exe den zurückliefernden Wert auch wirklich übergibt???
Vielen Dank