1
votes

Currently my console application can return Integer values from the console application via "ExitProcess" Kernel32 function.

Public Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)

How to return string values from Console application to Batch file.

I would like to return string values like "Successfully transformed 100 batches..." etc.

1
Are these stock responses, or may there be strings that your application didn't anticipate? If the former, consider keeping an array of possible strings, indexed by a numeric result.Jim Mack
Do you want to actually return a value to some process that's calling the VB6 program, or do you just want to be able to print to the console?user65839

1 Answers

0
votes

On most platforms (and also in Windows) process exit-codes are integer values, but you could write string data to the standard output stream by using the GetStdHandle and WriteFile functions.