Jump to content

WpGetTrueClassName: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpGetTrueClassName}} This method is specific to Version 3, or higher, of the OS/2 operating system. This instance method returns the class name for the given object. ==Syntax== _wpGetTrueClassName(somSelf, Object) ==Parameters== ;''somSelf'' (SOMClassMgr *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class **SOMClassMgr**. ;''Object'' (WPObject *) - input :The object to get the class name for...."
 
(No difference)

Latest revision as of 01:49, 17 November 2025

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

This instance method returns the class name for the given object.

Syntax

_wpGetTrueClassName(somSelf, Object)

Parameters

somSelf (SOMClassMgr *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class **SOMClassMgr**.
Object (WPObject *) - input
The object to get the class name for.

Returns

pszClassName (PSZ) - returns
The class name string.

How to Override

This method is not generally overridden.

Usage

This method can be called at any time to obtain the name of the object class that implements this object. This method is usually only for use by base classes when the objects they are storing are being made dormant. It is invoked using the **SOMClassMgrObject** class.

Remarks

If a standard Workplace Shell object class has been replaced, the **wpGetTrueClassName** method will return the name of the class that actually implements the object, while the `somGetClassName` method will return the name of the replacement class. For example, if the WPFolder class has been replaced by the **MyFolder** class, **wpGetTrueClassName** will return the string **"WPFolder"**, while `somGetClassName` will return the string **"MyFolder"**.

Example Code

Declaration.

#define INCL_WINWORKPLACE
#include <os2.h>

SOMClassMgr *somSelf; /* Pointer to the object on which the method is being invoked. */
WPObject *Object; /* The object to get the class name for. */
PSZ pszClassName; /* The class name string. */

pszClassName = _wpGetTrueClassName(somSelf,
                  Object);

This example shows how to call the **wpGetTrueClassName** method to obtain the name of the object class that implements the object pointed to by **somSelf**.

    PSZ pszClassName;

    pszClassName = _wpGetTrueClassName(SOMClassMgrObject,somSelf);

Related Methods