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

The OS/2 API Project

WinSetObjectData

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

Syntax

rc = WinSetObjectData( hObject, pszSetupString);

Parameters

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

PSZ pszSetupString (input)
Pointer to a string containing object parameters.

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 set a data string to the specified object.

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); // Set some new information (association filter) to our newly created object strcpy(szNewInfo, "PROGTYPE=PM;EXENAME=MYNEWPROG.EXE;ASSOCFILTER=*.MYP;ASSOCTYPE=My Program"); rc = WinSetObjectData(hObject, szNewInfo); . . .

See Also

WinCreateObject, WinDeregisterObjectClass, WinDestroyObject, WinRegisterObjectClass, WinReplaceObjectClass

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

WinSetObjectData