 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1989. All rights reserved
LAYERED PRODUCT: PLI V3.2 OP/SYS: VMS V5.0
SOURCE: Digital Customer Support Center
OVERVIEW:
This program demonstrates how to call SMG$SNAPSHOT
CAUTION: This sample program has been tested using:
PRODUCT: PLI V3.2 on OPERATING SYSTEM: VMS
However, we cannot guarantee its effectiveness because of the possibility of
errors in transmitting or implementing it. It is meant to be used as a
template for writing your own program, and it may require modification for use
on your system.
PROGRAM NOTES:
This program creates 2 pasteboards, one which it associates with a terminal,
the other which is associated with a file. At the appropriate time, the
information on one of the pasteboards is written to the file using
SMG$SNAPSHOT.
PROGRAM SAMPLE:
SMGTEST:proc options(main);
%include $stsdef;
%include $smgdef;
%include smg$create_virtual_keyboard;
%include smg$create_pasteboard;
%include smg$create_virtual_display;
%include smg$paste_virtual_display;
%include smg$put_line;
%include smg$snapshot;
dcl termset fixed bin(31);
dcl promptf char(32) init('***This is a test of snapshot***');
dcl promptt char(32) init('***Making snapshot of 2nd PST***');
dcl keyboard_id fixed bin(31);
dcl rows fixed binary(31) init(20);
dcl columns fixed binary(31) init(65);
dcl paste_rows fixed binary(31) init(3);
dcl paste_columns fixed binary(31) init(15);
dcl new_pidt fixed binary(31);
dcl new_pidf fixed binary(31);
dcl i fixed bin(31) init(0);
dcl display_idf fixed bin(31);
dcl display_idt fixed bin(31);
dcl fileid char(12) init('SNAPSHOT.DAT');
dcl termtype bit(32) aligned;
/* create the virtual keyboard*/
sts$value = SMG$CREATE_VIRTUAL_KEYBOARD(keyboard_id,,,);
if ^sts$success
then signal vaxcondition(sts$value);
/* create the paste board - (terminal)*/
sts$value = SMG$CREATE_PASTEBOARD(new_pidt,,,,,termtype);
if ^sts$success
then signal vaxcondition(sts$value);
/* create the paste board - file or hardcopy printer*/
sts$value = SMG$CREATE_PASTEBOARD(new_pidf,fileid,,,,termtype);
if ^sts$success
then signal vaxcondition(sts$value);
/* create the virtual display*/
sts$value = SMG$CREATE_VIRTUAL_DISPLAY(rows,columns,display_idt,,,);
if ^sts$success
then signal vaxcondition(sts$value);
/* paste the virtual display*/
sts$value = SMG$PASTE_VIRTUAL_DISPLAY
(display_idt,new_pidt,paste_rows,paste_columns,);
if ^sts$success
then signal vaxcondition(sts$value);
/*write a line to the terminal*/
sts$value = SMG$PUT_LINE(display_idt,promptt,,,,,,);
if ^sts$success
then signal vaxcondition(sts$value);
/* create the virtual display*/
sts$value = SMG$CREATE_VIRTUAL_DISPLAY(rows,columns,display_idf,,,);
if ^sts$success
then signal vaxcondition(sts$value);
/* paste the virtual display*/
sts$value = SMG$PASTE_VIRTUAL_DISPLAY
(display_idf,new_pidf,paste_rows,paste_columns,);
if ^sts$success
then signal vaxcondition(sts$value);
/*write a line to the file pasteboard*/
sts$value = SMG$PUT_LINE(display_idf,promptf,,,,,,);
if ^sts$success
then signal vaxcondition(sts$value);
/*take a snapshot, write contents of pasteboard to file*/
sts$value = SMG$SNAPSHOT(new_pidf,);
if ^sts$success
then signal vaxcondition(sts$value);
end smgtest;
|
buy online or call 1.800.AT.COMPAQ
|
|