The prntdemo sample program demonstrates how to use the Viewing API to print documents to a specified printer. To start the prntdemo program, enter the following command at a DOS prompt or in the Run dialog box:

prntdemo printername,printerdevice,printerport

For example:

prntdemo \\Calculus\HP Laserjet IIIsi,winspool,NE00:

The program displays the Open dialog box for you to select the file to print.