Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 1 - Device Manager / Device Manager Reference
Device Manager Functions / Opening and Closing Device Drivers


OpenDeskAcc

You can use the OpenDeskAcc function to open an item in the Apple menu.

pascal short OpenDeskAcc(ConstStr255Param deskAccName);
deskAccName
A Pascal string containing the name of the Apple menu item.
DESCRIPTION
The OpenDeskAcc function opens the Apple menu item specified by the deskAccName parameter. If the item is already open, the OpenDeskAcc function schedules it for execution and returns to your application. Otherwise, it prepares to open the item. In either case, your application receives a suspend event and the selected item is brought to the foreground.

You should ignore the value returned by OpenDeskAcc. If the menu item is a desk accessory and is successfully opened, the function result is a driver reference number for the desk accessory driver. Otherwise the function result is undefined. The desk accessory is responsible for informing the user of any errors.

Because some older desk accessories may not reset the current graphics port before returning, you should bracket your call to OpenDeskAcc with calls to the QuickDraw procedures GetPort and SetPort, to save and restore the current port.

SPECIAL CONSIDERATIONS
The OpenDeskAcc function may move memory; you should not call it at interrupt time.

SEE ALSO
For information about closing a desk accessory, see the description of the CloseDeskAcc function beginning on page 1-68.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996