Jump to content

wpSetObjectID

From EDM2

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

This instance method sets the object ID assigned to this object. The instance data is set, but the .INI file is not modified.

Syntax

_wpSetObjectID(somSelf, pszObjectID)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
pszObjectID (PSZ) - input
String containing a unique object ID.
For example, "<PM_DESKTOP>".

Returns

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

How to Override

This method is generally not overridden.

Remarks

The install routine uses the object ID to ensure that a given object is never re-installed, thereby avoiding duplication of objects. The object ID is always lost when the object is copied; therefore, only one object ever exists within a given object ID.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszObjectID; /* String containing a unique object ID. */
BOOL rc; /* Success indicator. */

rc = _wpSetObjectID(somSelf, pszObjectID);


Related Methods