Do you know how to call a non-VB application (a "shell"
from within VB and return the output (stderr or stdout) of the non-VB application to the VB application. Someone attempted to do this with the CreateProcess function and it does not work. The -V option to the mqfta.exe executable causes mqfta to produce verbose output which I want to capture in the log.
Here is how is is currently done:
'Set executable variable for MQFTA
sCommand = sCustomDir & "\mqfta.exe -m" & sQmanager & " -q" & sQueue _
& " -f" & sFileWPath & " -A" & sAppid & " -I" & sIntid & " -V >>" & fErrorlog
'Send file via MQFTA
sMessage = "MESSAGE: SENDING FILE TO MQFTA: " & vbCrLf & sCommand & vbNewLine
fErrorlog.Write Now & " " & sMessage
ret& = CreateProcess(vbNullString, sCommand, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, vbNullString, start2, proc2)
sMessage = "MQFTA Ended with Return Code: " & ret& & vbCrLf
fErrorlog.Write Now & " " & sMessage
Here is how is is currently done:
'Set executable variable for MQFTA
sCommand = sCustomDir & "\mqfta.exe -m" & sQmanager & " -q" & sQueue _
& " -f" & sFileWPath & " -A" & sAppid & " -I" & sIntid & " -V >>" & fErrorlog
'Send file via MQFTA
sMessage = "MESSAGE: SENDING FILE TO MQFTA: " & vbCrLf & sCommand & vbNewLine
fErrorlog.Write Now & " " & sMessage
ret& = CreateProcess(vbNullString, sCommand, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, vbNullString, start2, proc2)
sMessage = "MQFTA Ended with Return Code: " & ret& & vbCrLf
fErrorlog.Write Now & " " & sMessage