Jump to content

wpQueryLocalAlias

From EDM2

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

This instance method returns the local alias of the remote printer object. The local alias is the local print queue as defined in the OS/2 print spooler.

Syntax

_wpQueryLocalAlias(somSelf, pBuf, pcbBuf)

Parameters

somSelf (WPRPrinter *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPRPrinter.
pBuf (PSZ) - output
Buffer in which the local print queue name is returned.
pcbBuf (PULONG) - in/out
Pointer to the length, in bytes, of the $pBuf$ buffer.
If $pBuf$ points to zero, or this call fails, the length of the required buffer plus one is returned in this parameter.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.
If the buffer is too small, $pcbBuf$ will contain the required size of the buffer. If there does not exist a local alias for this remoter printer object, $pcbBuf$ will contain zero.

How to Override

This method is generally not overridden.

Usage

This method is not covered in the provided text.

Remarks

The returned local print queue name can be used to submit print jobs to the network printer. If there is no local print queue that references this network printer object, $pcbBuf$ is set to 0 and **FALSE** is returned.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPRPrinter *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pBuf; /* Buffer in which the local print queue name is returned. */
PULONG pcbBuf; /* Pointer to the length, in bytes, of the pBuf buffer. */
BOOL rc; /* Success indicator. */

rc = _wpQueryLocalAlias(somSelf, pBuf, pcbBuf);

Related Methods