Jump to content

WinDeregisterObjectClass: Difference between revisions

From EDM2
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinDeregisterObjectClass ==
Remove a Workplace Shell class. This function deregisters (removes) a workplace object class.
; WinDeregisterObjectClass (className) : Remove a Workplace Shell class.


=== Parameters ===
==Syntax==
; className - [[OS2 API:DataType:PSZ|PSZ]] - input : Class name.
WinDeregisterObjectClass(pszClassName)


=== Constants ===
==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 ===
==Returns==
True if successful, false if not successful.
; rc (BOOL) - returns:Success indicator.
* [[OS2 API:Constant:TRUE|TRUE]]
:True if successful, false if not successful.
* [[OS2 API:Constant:FALSE|FALSE]]
::TRUE - Successful completion
::FALSE - Error occurred.


=== Module ===
== Define (C/C++) ==
 
=== Define (C/C++) ===
INCL_WINWORKPLACE
INCL_WINWORKPLACE


=== Export name/Ordinal ===
== Calling Convention ==
 
=== Calling conversion ===
[[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.
[[OS2 API:DataType:PSZ|PSZ]]    className;
[[OS2 API:DataType:BOOL|BOOL]]  rc;
...
rc = WinDeregisterObjectClass (className);
...
 
=== Related Functions ===
[[OS2 API:WinRegisterObjectClass|WinRegisterObjectClass]]
[[OS2 API:WinReplaceObjectClass|WinReplaceObjectClass]]


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


Line 41: Line 30:
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.


=== OS Version Introduced ===
== Example Code ==
Definiton
<PRE>
#define INCL_WINWORKPLACE
#include <os2.h>
 
PSZ    pszClassName;  /*  Pointer to class name. */
BOOL    rc;            /*  Success indicator. */


[[OS2_API | Back to OS/2 API]]
rc = WinDeregisterObjectClass(pszClassName);
</PRE>


== Related Functions ==
*[[WinRegisterObjectClass]]
*[[WinReplaceObjectClass]]


[[Category:The OS/2 API Project]]
[[Category:Win]]

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