ProvideX V8.20 > Language Reference > 9. Special Command Tags
801
Use a similar format to open a COM port for direct access to a serial device (e.g., ,a
serial printer or weigh scale) on the client PC without going through a spooler,
LET SETTING$="9600,n,8,1,x"
OPEN (5,OPT=SETTING$)"[WDX]COM2"
or
OPEN (5,OPT="9600,n,8,1,x",ERR=BADCOM)"[WDX]COM2"
Format 6: [WDX] with Other Tags
OPEN (chan[,fileopt])"[WDX][tag]prog;[params]"
[WDX] can be used in conjunction with other file tags; e.g.,
0010 OPEN (1)"[WDX][DDE]excel;existing_worksheet.wk1"
Format 7: Windows Print Subsystem on Client
OPEN [INPUT] (chan[,fileopt])"[WDX]*device*[;Q_name[;Q_options]]"
ProvideX opens the special device files *WINPRT* and *WINDEV* on the PC/server
which issues the command. Except in UNIX (where it's done automatically), use
[WDX] with OPEN [INPUT] directives for the two specialty files to direct any print
jobs and dialogues to the WindX client PC, which will in turn use its Windows print
subsystem API to deal with the jobs and send them to the given printer; e.g.,
OPEN (7,ERR=1500)"[WDX]*WINPRT*"
With a WindX client and anWindows Server, if you do not use [WDX] in your OPEN
directive, then the printer selection dialogue will appear on the server console, and
any print queue you name directly must exist on the Windows Server in the Control
Panel printers folder.
See also [WDX]*WINDEV* Escape Sequences, p.754, *WINDEV* Raw Print Mode,
p.752, and *WINPRT* Windows Printing, p.756.
Formats 8 & 9: Remote Object Support
NEW("[WDX]ClassName")
DEF OBJECT com_id,"[WDX]objname"
The [WDX] tag can be used to create OOP/COM objects and manipulate them across
a WindX connection as if they existed locally.
Methods can be passed arguments and receive results; however, only the result of a
method will be returned across a remote connection. Any changes to the arguments
of a method by the remote object will not be returned across the connection.
Arguments are therefore considered to be passed by value only. If you need to
retrieve arguments as well as the result, you must place your code in a program on
the WindX workstation and interact with that code.