DOCERR: Wrong WinHelp Declaration in Windows Ver 3.1 API Ref

Last reviewed: June 21, 1995
Article ID: Q108036
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows,

  version 3.0

SUMMARY

This article corrects a documentation error for the WinHelp function call as described in the Windows version 3.1 API Reference help file that shipped with Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

The declaration is incorrectly shown as:

Declare Function WinHelp Lib "User" (ByVal hWnd As Integer,
                         ByVal lpHelpFile As String,
                         ByVal wCommand As Integer,
                         dwData As Any) As Integer

The correct declaration is as follows:

Declare Function WinHelp Lib "User" (ByVal hWnd As Integer,
                         ByVal lpHelpFile As String,
                         ByVal wCommand As Integer,
                         ByVal dwData As Any) As Integer

NOTE: Each Declare statement must be entered as one, single line.

Notice that the "ByVal" keyword was omitted from the last parameter in the online reference. This means that the function is passing the last parameter "dwData" by reference. It needs to be passed by value.

The most common error that occurs when using the incorrect declaration is a message box stating "Help topic does not exist."


Additional reference words: 3.00 docerr
KBCategory: kbref kbdocerr
KBSubcategory: RefsDoc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.