Miscellaneous Functions


Mac OS X header: Carbon/Carbon.h
Mac OS 9 header: AppleHelp.h


Miscellaneous Functions Functions
AHRegisterHelpBook Registers a help book.
AHSearch Tells the Help Viewer to search for a specified string in a given help book.


AHRegisterHelpBook

Carbon status: Supported

Registers a help book.

OSStatus AHRegisterHelpBook (
    const FSRef *appBundleRef
);
Parameter descriptions
appBundleRef

A file specification for the bundle containing the help book you wish to register.

function result

A result code.

Discussion

Carbon applications must call this function in order to register a help book. If your Cocoa application provides appropriate key/value pairs specifying a single help book in your application’s package list, as described in “Registering a Help Book Through a Property List”, you do not need to call AHRegisterHelpBook. If you install an additional help book that is not described in your package list, you must call the AHRegisterHelpBook function in order to have the new book appear in the Help Center. If you call this function and specify a help book that is already registered, the AHRegisterHelpBook function returns a result of noErr.

Availability

Supported in Carbon. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.


AHSearch

Carbon status: Supported

Tells the Help Viewer to search for a specified string in a given help book.

OSStatus AHSearch (
    CFStringRef bookname, 
    CFStringRef query
);
Parameter descriptions
bookname

A string specifying the name of the help book to be searched. If the name of the help book (as specified by the AppleTitle meta tag) is SurfWriter Help, for example, you pass a string containing the value SurfWriter Help. If you pass NULL in this parameter, the Help Viewer searches all available help books.

query

A string containing the text to search for.

function result

A result code.

Discussion

This function is synchronous. Calling this function opens the Help Viewer application, if required, and displays the results of the search.

Availability

Supported in Carbon. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.


© 2001 Apple Computer, Inc. (Last Updated July 17, 2001)