wpSetJobProperties - Example Code

This example creates a printer using default values and then sets the job properties of the newly created printer.

#include "wpprint.h"

WPPrinter *CreateAndSetPrintObject(WPPrinter *PrintObj)
{
  WPFolder *hwpFolder;

  hwpFolder = _wpclsQueryObjectFromPath(_WPFileSystem,
                                        (PSZ)"<WP_PRINTERSFOLDER>");
  if (!hwpFolder)
    return (PrintObj);

  if (!PrintObj)
    PrintObj = _wpclsNew(_WPPrinter,
                         "New Printer",
                         " ",
                         hwpFolder,
                         TRUE);

  if (PrintObj)
    _wpSetJobProperties(PrintObj,
                        NULL);

  return (PrintObj);
}


[Back: wpSetJobProperties - Related Methods]
[Next: wpSetJobProperties - Topics]