The new OpenWorkbenchObject() can be used to execute a program as if the user had double-clicked on its icon. This is expecially useful for commodities that put up toolbars or menus to start other applications.
Before V44, a similar functionality was made available by third-party
tools such as the wbstart.library
and the WBStart-Handler
.
While third-party Workbench launchers are still supported in V44,
applications should be updated as soon as possible to use
OpenWorkbenchObject() when they detect a workbench.library
whose version is greater or equal to V44.
Future versions of the Workbench may extend the WBStartup structure to add new functionality. Then, the hack of sending faked WBStartup messages to process's pr_MsgPort WILL STOP WORKING.
OpenWorkbenchObject() can also open drawers. This feature can be useful in some Workbench enhancer commodities.
Note that OpenWorkbenchObject()
fails if it is invoked
while the Workbench program is not running. This behaviour prevents
usage of this function by Workbench replacement applications. Workbench
replacements should launch applications autonomously. After all, the
cleanest way to duplicate Workbench functionality is providing a
compatible replacement of the workbench.library instead of patching
most of its vectors.
Go to the first, previous, next, last section, table of contents.