Problem:
This example illustrates how to use the DeviceCapabilities Win32 function to determine the number of copies a local printer is capable printing. It also illustrates how to create a "bridge" Dll for Winspool functions.
Resolution:
INTRODUCTION
==========
This example illustrates how to use the DeviceCapabilities Win32 function to determine the number of copies a local printer is capable of printing. It also illustrates how to create a "bridge" Dll for Winspool functions.
SOURCE FILES:
=========
Program Files Description
---------------- -----------------------------------------------------------
DevCaps.cbl This program uses the DeviceCapabilities function to retrieve the maximum
number of copies the printer is capable of producing.
Wsp32api.cbl This Dll functions as a "bridge" to the functions within Winspool.btr. It can be
used in the same manner as cob32api.dll. More information on how this Dll was
created can be found in the 32bWinApi.doc Wordpad document included in this
zip file.
Copy Files:
------------------- -----------------------------------------------------------
Prototypes.cpy This copy book is a COBOL prototype for the Win32 DeviceCapabilities
function.
Resource Files:
---------------- -----------------------------------------------------------
Wsp32api.def This module definition file defines the Winspool functions that can be accessed.
REQUIREMENTS:
=============
Check and Animate DevCaps.cbl after modifying the literal value used to initialize szDevice to your printer name and modifying the literal value used to initialize szPort to the port where your printer is connected.
OPERATION:
==========
DeviceCapabilities returns a "-1" return value when the requested capability cannot be returned.
NOTE:
=====
More information on DeviceCapabilities can be located in the Win32 SDK Help, Win32 Programmer's Reference, Reference, Functions, DelMDIChildProc to DrawFocusRect, DeviecCapabilities book.
==========================================================
Keywords: demonstration, sample, example, demo, printing, deviceCapabilities.zip
demo.ex
demo.me
demo.ne