Important: The information in this document is obsolete and should not be used for new development.
LaunchDeskAccessoryYou can use the
LaunchDeskAccessoryfunction to launch desk accessories. Use this function only when your application needs to launch a desk accessory for some reason other than the user's choosing one from the Apple menu. (When the user chooses any Apple menu item that is not specific to your application, use the
FUNCTION LaunchDeskAccessory (pFileSpec: FSSpecPtr; pDAName: StringPtr): OSErr;
- A pointer to a file system specification of the resource fork to search for the specified desk accessory.
- The name of the
'DRVR'resource to launch.
LaunchDeskAccessoryfunction searches the resource fork of the file specified by the
pFileSpecparameter for the desk accessory with the
'DRVR'resource name specified in the
pDANameparameter. If the
'DRVR'resource name is found,
LaunchDeskAccessorylaunches the corresponding desk accessory. If the desk accessory is already open, it is brought to the front.
pFileSpecparameter to specify the file to search. Specify
NILas the value of
pFileSpecif you want to search the current resource file and the resource files opened before it. Otherwise, use a pointer to an
FSSpecrecord to specify the file.
pDANameparameter, specify the
'DRVR'resource name of the desk accessory to launch. Specify
NILas the value of
pDANameif you want to launch the first
'DRVR'resource found in the file as returned by the Resource Manager. Because the
LaunchDeskAccessoryfunction opens the specified resource file for exclusive access, you cannot launch more than one desk accessory from the same resource file.
'DRVR'resource is in a resource file that is already open by the current process or if the driver is in the System file and the Option key is pressed,
LaunchDeskAccessorylaunches the desk accessory in the application's heap. Otherwise, the desk accessory is given its own partition and launched in the system heap.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
Trap macro Selector _OSDispatch $0036
noErr 0 No error resNotFound -192 Resource not found