WinCreateObject

Creates an instance of the object specified by className, having the title specified by titleOfObject, and places the icon and title in the location specified by location.

Syntax
WinCreateObject (className, titleOfObject, setupString, location, creationFlags)

Parameters

 * className - PSZ - input : Class name of object.
 * titleOfObject - PSZ - input : The title to appear, when displayed, underneath an icon or in the titlebar, of the open object.
 * setupString - PSZ - input : See the description for the Workplace WPLaunchPad for a table of setup strings to customize the Toolbar.
 * location - PSZ - input : The value can be in the following formats:

Any predefined system folder object ids:
 * "" The hidden folder.
 * "" The currently active desktop.
 * "" The System folder.
 * "" The Templates folder.
 * "" The System Setup folder.
 * "" The Startup folder.
 * "" The Information folder.
 * "" The Drives folder.

The real name as a fully qualified path name. One of the following:
 * creationFlags - ULONG - input :
 * CO_FAILIFEXISTS - No object will be created if an object with the given object ID already exists. This is the default.
 * CO_REPLACEIFEXISTS - If an object with the given ID already exists, the existing object should be replaced.
 * CO_UPDATEIFEXISTS - If an object with the given ID already exists, the existing object should be updated with the new information.

Constants
See the paramters section.

Returns
APIRET with values of:
 * HOBJECT - Handle to created object.
 * NULLHANDLE - Object creation failed.

Define (C/C++)
INCL_WINWORKPLACE

Calling Convention
Cdecl32

Example Code
PSZ   className; PSZ   titleOfObject; PSZ   setupString; PSZ   location; ULONG creationFlags; APIRET rc; ... rc = WinCreateObject(className, titleOfObject, setupString, location, creationFlags); ...

Related Functions

 * WinDeregisterObjectClass
 * WinDestroyObject
 * WinRegisterObjectClass
 * WinReplaceObjectClass
 * WinSetObjectData