Jump to content

wpSetRemoteOptions

From EDM2

This method is specific to version 3, or higher, of the OS/2 operating system.

This instance method sets the job view options for a printer object.

Syntax

_wpSetRemoteOptions(somSelf, ulRefreshInterval, flAllJobs)

Parameters

somSelf (WPPrinter *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPPrinter.
ulRefreshInterval (ULONG) - input
Time interval, in seconds, when the printer object is refreshed.
flAllJobs (ULONG) - input
Flag indicating which jobs to display.
  • TRUE Display all jobs waiting in the network queue.
  • FALSE Display only the current user's jobs.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPPrinter *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulRefreshInterval; /* Time interval, in seconds, when the printer object is refreshed. */
ULONG flAllJobs; /* Flag indicating which jobs to display. */
BOOL rc; /* Success indicator. */

rc = _wpSetRemoteOptions(somSelf, ulRefreshInterval,
        flAllJobs);

Example Code

    BOOL        rc;
    ULONG       ulOrigRefreshSeconds = 0;
    ULONG       ulOrigAllJobsDisplay = 0;

    ULONG       ulRefreshSeconds = 5;      /* Refresh interval of 5 seconds */
    ULONG       ulAllJobsDisplay = TRUE;   /* Display all jobs              */

    rc = _wpQueryRemoteOptions( somSelf
                             , &ulOrigRefreshSeconds
                             , &ulOrigAllJobsDisplay);

    somPrintf("Original Refresh = %u, Jobs Display = %u.\n",
              ulOrigRefreshSeconds,ulOrigAllJobsDisplay);

    rc = _wpSetRemoteOptions( somSelf
                            , ulRefreshSeconds
                            , ulAllJobsDisplay);

Related Methods