Jump to content

wpSetObjectNetId

From EDM2

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

This instance method is called to set the network ID of the Shared Directory object that this object is linked to.

Syntax

_wpSetObjectNetId(somSelf, pszNetIdentity)

Parameters

somSelf (WPNetLink *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPNetLink.
pszNetIdentity (PSZ) - input
Pointer to the network ID string.
The network name is in the following format:

$$<\text{Network}> \backslash <\text{Server}> \backslash <\text{Share Name}>$$

Where:
  • **<Network>** Network identification
  • **<Server>** Server identification
  • **<Shared Name>** Shared Name

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 to set the network ID.

Remarks

The Shared Directory object uses this ID to make its network calls. This ID is not stored in the object's data.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPNetLink *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszNetIdentity; /* Pointer to the network ID string. */
BOOL rc; /* Success indicator. */

rc = _wpSetObjectNetId(somSelf, pszNetIdentity);

Related Methods