Using the PLBCGI Command
The PLBCGI command interfaces between the PL/B Automation Server and the CGI interface of a Windows Web Server.
When the PLBCGI command is invoked, it creates a PL/B Automation Server program object and executes the Run method using the command line used with the PLBCGI command:
will send the command line:
Once the Run method has been executed, the PLBCGI command uses the EventSend method to transmit the data contained in stdin. For every block of 200 bytes, an event with an eventId of one (1) and one VT_BSTR parameter will be sent to the server program. The VT_BSTR parameter will contain the data.
When all the data has been sent, an event with an eventId of two (2) will be sent to the server program.
The PLBCGI command will then wait for the Exit event from the program object. For every UserEvent1 received, the PLBCGI command writes the contents of argument1 to stdout. Once the Exit event is received, the PLBCGI command terminates.
The following is a sample PL/B program that interacts with the PLBCGI command:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This program displays any received stdin data. Upon completion of receiving all data, the program will send back two lines of data to be placed in stdout. It will then terminate.
See Also: Automation
![]() |