Hello,
Step.Result.ExitCode returns the exit code of the exe. This is usually determined by the return value (ie: "return 0" usually indicates that everything exits correctly).
That being said, I would highly recommend building a dll instead of calling an exe and just passing parameters back as is intended by the different programming techniques. An exe, while it does have an exit code, is not intended to pass variables back. I agree with the earlier posting suggesting you use a different type of code module. As you have discovered, it is definitely possible to get around the issue and use a exe, but it is generally not an encouraged programming practice.
Regards,
Aaron B.
National Instruments