| Document revision date: 10 November 2000 | |
![]() |
|
|
|
| Previous | Contents | Index |
The information in this appendix applies only to OpenVMS operating systems.
Your application can use the OpenVMS DECwTermPort routine to create a DECterm window on any node, local or remote. You can also create DECterm windows by spawning a CREATE/TERMINAL command; however, using the DECwTermPort routine provides better performance. (Users can create a DECterm window from the session manager's Applications menu or by using the CREATE/TERMINAL command in DCL.)
Example A-1 illustrates how to use the DECwTermPort routine to create a DECterm window on a remote system.
| Example A-1 Creating a DECterm Window on a Remote Node | ||
|---|---|---|
#include descrip /* descriptor definitions */
#include ssdef /* system status codes */
#include prcdef /* stsflg bits for creating process */
main( )
{
int status, stsflg;
short device_length;
(1)char device_name[50];
$DESCRIPTOR( command, "SYS$SYSTEM:LOGINOUT.EXE" );
$DESCRIPTOR( input_file, "" );
$DESCRIPTOR( output_file, "" );
/* send the message to the controller */
(2)status = DECwTermPort( 0, 0, 0, device_name, &device_length );
if ( status != SS$_NORMAL )
printf( "DECterm creation failed, status is %x\n", status );
else
{
/* create a process that is already logged in */
/* input from TWn: */
(3)input_file.dsc$w_length = device_length;
input_file.dsc$a_pointer = device_name;
/* output to TWn: */
output_file.dsc$w_length = device_length;
output_file.dsc$a_pointer = device_name;
/* make it detached, interactive, logged in */
stsflg = PRC$M_DETACH | PRC$M_INTER | PRC$M_NOPASSWORD;
/* create the process */
(4)status = sys$creprc( 0, &command, &input_file,
&output_file, 0, 0, 0, 0, 4, 0, 0, stsflg );
if ( status != SS$_NORMAL )
printf( "Could not run LOGINOUT.EXE, status is %x\n", status );
}
}
|
Example A-2 provides a command procedure to compile, link, and run the example program.
| Example A-2 Command Procedure to Compile, Link, and Run a DECterm on a Remote Node | ||
|---|---|---|
(1)$ cc create_decterm (2)$ link create_decterm, sys$input/opt sys$share:decw$xlibshr/share sys$share:decw$dwtlibshr/share sys$share:vaxcrtl/share sys$share:decw$terminalshr/share (3)$ set display/create/node=mynode (4)$ run create_decterm |
| Index | Contents |
|
| privacy and legal statement | ||
| 5639MOTIFPRO_024.HTML | ||