After you've created help files, use the WinHelp library routine to interact with the Microsoft Help application that is bundled with Windows. This allows you to perform a variety of functions such as opening one of your help files and directing Help to a particular topic. WinHelp is fully explained in the SDK documents.

$WINHELP provides a direct interface to WinHelp. The advantages to using $WINHELP are:

WinHelp takes four parameters: the handle of the main application window, the name of the help file, an operation code and an operation-dependent parameter. $WINHELP takes similar parameters, but with the following differences:

In summary, you pass either two or three parameters to $WINHELP. These are (in order):

  1. the filename of the help file
  2. the desired operation code
  3. an operation-dependent parameter (which can be omitted)

As a convenience, the COBOL declarations for the operation codes can be found in the file winhelp.def. The operation codes found there exactly correspond to the operation codes documented for WinHelp in the SDK.