Jump to content

WinDeregisterObjectClass: Difference between revisions

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


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


== Parameters ==
== Parameters ==
; className ([[PSZ]]) - input : Class name.
; 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 ==
== Returns ==
Line 22: Line 24:
[[Cdecl32]]
[[Cdecl32]]


== Example Code ==
==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.  
PSZ    className;
BOOL  rc;
...
rc = WinDeregisterObjectClass (className);
...
 
== Related Functions ==
*[[WinRegisterObjectClass]]
*[[WinReplaceObjectClass]]


== Notes ==
== Notes ==
Line 40: Line 33:


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.
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
<PRE>
#define INCL_WINWORKPLACE
#include <os2.h>
PSZ    pszClassName;  /*  Pointer to class name. */
BOOL    rc;            /*  Success indicator. */
rc = WinDeregisterObjectClass(pszClassName);
</PRE>
== Related Functions ==
*[[WinRegisterObjectClass]]
*[[WinReplaceObjectClass]]


[[Category:Win]]
[[Category:Win]]

Revision as of 20:02, 7 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