Process system‑level Windows messages

WTSupported in traditional Synergy on Windows




exit = %WIN_PROC([wait_flag])

Return value


The exit value of the function. (n)



(optional) The “wait for completion” flag. (n)


If wait_flag is not specified or has a value of 0, any currently pending Windows messages are processed. Once all messages are processed, %WIN_PROC returns with a value of 0.

If wait_flag is specified and has a nonzero value, the program enters a “wait for Windows messages” mode. All pending Windows messages are processed, and any further messages are waited for and processed. This continues until a %WIN_STOP function is executed. (See %WIN_STOP for more information.) At this time, the value specified by the %WIN_STOP request is returned.

Wait modes cannot be nested. If a wait mode is already in effect from a currently active %WIN_PROC call, a fatal error is generated and the running Synergy program is stopped.

%WIN_PROC is used as part of the ActiveX API, but you can use it in other contexts as well. For example a call to %WIN_PROC with a wait_flag of 0 is the same as doing an EM_YIELD.

%WIN_PROC requires axlib.elb.