Jump to content

wpQueryNetworkId

From EDM2

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

This instance method returns the fully qualified network ID of the remote print queue for the network printer object.

Syntax

_wpQueryNetworkId(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 network ID is returned.
The network ID must be in the following form:

$$<\text{network}>: \backslash \backslash <\text{server}> \backslash <\text{resource}>$$

For example, `LS:\\DEPTSERV\DEPTPRNT`.
A return value of **NULL** indicates that *pcbBuf* is too small to hold the network ID.
pcbBuf (PULONG) - in/out
Size, in bytes, of the *pBuf* buffer.
If *pBuf* is **NULL** or this call fails, the length of the required buffer is returned in this parameter.

Returns

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

How to Override

This method is generally not overridden.

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 network ID is returned. */
PULONG pcbBuf; /* Size, in bytes, of the pBuf buffer. */
BOOL rc; /* Success indicator. */

rc = _wpQueryNetworkId(somSelf, pBuf, pcbBuf);

Related Methods