[ Home | Alpha index | Topic index | Tutorials | Download | Feedback ]

The OS/2 API Project

WinDestroyObject

[ Syntax | Params | Returns | Include | Usage | Structs | Gotchas | Code | Also ]

Syntax

rc = WinDestroyObject( hObject );

Parameters

HOBJECT hObject (input)
A handle to the object to be destroyed.

Returns

BOOL rc
A success indicator. TRUE = Call successful. FALSE = An error occurred.

Include Info

#define INCL_WINWORKPLACE
#include <os2.h>

Usage Explanation

This function is called to remove an existing object from the desktop.

Relevant Structures

Gotchas

Sample Code

#define INCL_WINWINDOWMGR #include <os2.h> . . . // Places an object called "My Program" in the OS/2's System Folder hObject = WinCreateObject("WPProgram", "My Program", "PROGTYPE=PM;EXENAME=MYPROG.EXE;", "<WP_OS2SYS>", CO_FAILIFEXISTS); // Destroying the newly created object rc = WinDestroyObject(hObject); . . .

See Also

WinCreateObject, WinDeregisterObjectClass, WinRegisterObjectClass, WinReplaceObjectClass, WinSetObjectData

Author

Bill Buchanan - billb@ic.net

Additions

Last modified July 16/1996
Please send all errors, comments, and suggestions to: timur@vnet.ibm.com

The OS/2 API Project

WinDestroyObject