WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Variables and Parameters

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:01:08:12:41:26
Last Updated: 2001:01:08:12:41:26