jacillmar
7th April 2003, 14:14
I should call to a session and to wait for that return with some values. For which I am using "wait.and.activate", but does not expect to that return, but continues executing. I have used many times the "wait.and.activate" and never this had passed myself. Someone it knows why is occurring me?
NPRao
7th April 2003, 21:01
Please post your source code makes it easier to debug and fix it.
Refer to the online tools library for more info.
wait.and.activate() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_processes_wait_and_activate)
wait.and.activate()
--------------------------------------------------------------------------------
Syntax
long wait.and.activate( string progname(.) [, "arg1", "arg2", ...] )
Description
This activates the specified program. The calling program is put in a waiting state. Because the calling program has not ended, it retains all its values.
And it works for me.
|* First program script - zmadmtest
extern long ret.val
function main()
{
long procid
pno = wait.and.activate("ozmadmnp", "Hello", "World", "Testing")
message("Procid=%d", procid)
import("ret.val", ret.val)
message("Return value=%d", ret.val)
exit(0)
}
|* Second program script - zmadmnp
extern long ret.val
function main()
{
long i
message("No. of args=%d", argc()-1)
for i = 1 to (argc() - 1)
message("Argument(%d)=%s", i, argv$(i))
endfor
ret.val = 2003
export("ret.val", ret.val)
}