WinDeregisterObjectClass

From EDM2
Jump to: navigation, search

Remove a Workplace Shell class. This function deregisters (removes) a workplace object class.

Syntax

WinDeregisterObjectClass(pszClassName)

Parameters

pszClassName (PSZ) - input
Class name. Pointer to class name.
A pointer to a zero-terminated string which contains the name of the object class being removed from the workplace.

Returns

rc (BOOL) - returns
Success indicator.
True if successful, false if not successful.
TRUE - Successful completion
FALSE - Error occurred.

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

Remarks

Workplace object classes are not deleted unless the application issues a WinDeregisterObjectClass. Object classes will be automatically registered when a dynamic-link library containing an object definition is added to the system. The only advantage of deregistering an object class is to optimize the system performance. All registered classes are maintained in the OS2.INI and are cached upon system initialization. If the class is no longer needed, it should be removed.

Notes

Object class(es) are automatically registered when a dynamic load library containing an object definition is invoked.

The only advantage of deregistering an object is to improve system performance.

All registered classes are maintained in Interface Repository. Some classes has its representation in OS2.INI and are cached upon system initialization. Should a class not be needed it should be removed.

Example Code

Definiton

#define INCL_WINWORKPLACE
#include <os2.h>

PSZ     pszClassName;  /*  Pointer to class name. */
BOOL    rc;            /*  Success indicator. */

rc = WinDeregisterObjectClass(pszClassName);

Related Functions