Jump to content

WinDeregisterObjectClass: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
Remove a Workplace Shell class. This function deregisters (removes) a workplace object class.  
Remove a Workplace Shell class. This function deregisters (removes) a workplace object class.


==Syntax==
==Syntax==
  WinDeregisterObjectClass(pszClassName);
  WinDeregisterObjectClass(pszClassName)


== Parameters ==
==Parameters==
; pszClassName ([[PSZ]]) - input  
;pszClassName ([[PSZ]]) - input: Class name. Pointer to class name.
: 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.
: A pointer to a zero-terminated string which contains the name of the object class being removed from the workplace.


== Returns ==
==Returns==
; rc (BOOL) - returns
; rc (BOOL) - returns:Success indicator.
:Success indicator.
:True if successful, false if not successful.
:True if successful, false if not successful.
:;[[TRUE]]
::TRUE - Successful completion
::Successful completion
::FALSE - Error occurred.
:;[[FALSE]]
::Error occurred.


== Define (C/C++) ==
== Define (C/C++) ==
Line 25: Line 21:


==Remarks==
==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.  
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 ==
== Notes ==

Latest revision as of 19:57, 12 April 2024

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