Load a window from a library

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall U_LDWND(window_id, [channel], window_name, [D_NOPLC], [search], [error]
&     [, saved_name], {reserved})



Returned with the ID of the window. (n)


(optional) The channel of the window library. (n)


The name of the window to load. (a)


(optional) The no‑placement flag. If passed, the window is not placed on the screen. (n)


(optional) The search variable. (n)


(optional) The error return variable. (n)


(optional) The name of the window when it was originally saved. (a)


Reserved for internal use. (n)


U_LDWND loads a window from a window library.

Use U_LDWND to load text windows, selection windows, or general windows from a window library. Use I_LDINP to load input windows, and M_LDCOL to load menu columns. Lists must be created using L_CREATE, although you can load the list class into memory with U_LDWND.

If channel is not passed, g_utlib will be used.

If you pass a null string (“ ”) for window_name, Toolkit assigns a unique window name in the form _W_nnn, where nnn is the window ID. You must pass saved_name in this case.

If you want to create multiple instances of the same window, you can call U_LDWND as many times as you need, using window_name to give each succeeding window a new unique name. You must also pass saved_name if window_name is different than the name under which the window was saved.

To create another instance of the same window, pass “” for window_name. You must pass saved_name in this case. A window name is automatically generated for you.

If search is present, U_LDWND searches for an existing window with the specified name before attempting to load the window. If the window is found, a successful load is simulated, window_id is set to the ID of the window that was found, and the search variable is set to true. If the window is not found, the search variable is cleared and the load continues normally.

If error is present, it will be returned with a zero (0) if the requested window was found in the specified library or a non‑zero value (the error code number) if the window was not found. A fatal error occurs if error is not present and the window cannot be found; we recommend that you pass it.

See also


The first example loads a window with the name in wndname(i) from the window library on the channel stored in chnl, and returns the ID to wndid(i). This window will not be placed on the screen. Sts is the error variable and is returned with a value of 0 if the operation is successful.

xcall u_ldwnd(wndid(i), chnl, wndname(i), D_NOPLC,, sts)

The second example loads the window whose name is “password” from the library on the channel stored in chnl, and returns the ID to passid. The routine will look for an existing window named “password” before loading. Again, sts is the error variable. The window is placed on the screen.

xcall u_ldwnd(passid, chnl, "password",, found, sts)