Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Return a value to the Calling App???

Keywords: 	  return value

Question:

I know it is possible to send a parameter to a winbatch executable.... but can I return a value from the winbatch program to an application that ran the winbatch program

Are the parameters call by value or by reference ???

Answer:

  1. Parameters generally passed by value. There are some esoteric tricks to pass by reference within a single compiled EXE though.

  2. Options are limited to passing parameters back to a calling application. If the application is intellient enough to get the exit (aka error) code, then IntControl 1000 might do it for you.

  3. The normal method is just to have WinBatch write a value to an INI file (See the IniWritePvt function) and have the other application read it. (sometimes using a function called GetPrivateProfileString).

Also see 'User defined functions'.


Article ID:   W13920
Filename:   Return a Value from Winbatch to Calling App.txt