Microsoft KB Archive/108036: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 52: Line 52:


The declaration is incorrectly shown as:
The declaration is incorrectly shown as:
<pre class="codesample">Declare Function WinHelp Lib &quot;User&quot; (ByVal hWnd As Integer,
<pre class="codesample">Declare Function WinHelp Lib "User" (ByVal hWnd As Integer,
                         ByVal lpHelpFile As String,
                         ByVal lpHelpFile As String,
                         ByVal wCommand As Integer,
                         ByVal wCommand As Integer,
Line 58: Line 58:
                 </pre>
                 </pre>
The correct declaration is as follows:
The correct declaration is as follows:
<pre class="codesample">Declare Function WinHelp Lib &quot;User&quot; (ByVal hWnd As Integer,
<pre class="codesample">Declare Function WinHelp Lib "User" (ByVal hWnd As Integer,
                         ByVal lpHelpFile As String,
                         ByVal lpHelpFile As String,
                         ByVal wCommand As Integer,
                         ByVal wCommand As Integer,
                         ByVal dwData As Any) As Integer
                         ByVal dwData As Any) As Integer
                 </pre>
                 </pre>
'''NOTE''': Each Declare statement must be entered as one, single line. Notice that the &quot;ByVal&quot; keyword was omitted from the last parameter in the online reference. This means that the function is passing the last parameter &quot;dwData&quot; by reference. It needs to be passed by value.<br />
'''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.<br />
<br />
<br />
The most common error that occurs when using the incorrect declaration is a message box stating &quot;Help topic does not exist.&quot;
The most common error that occurs when using the incorrect declaration is a message box stating "Help topic does not exist."


</div>
</div>

Latest revision as of 10:20, 20 July 2020

Knowledge Base


DOCERR: Wrong WinHelp Declaration in Windows Ver 3.1 API Ref

Article ID: 108036

Article Last Modified on 3/3/2005



APPLIES TO

  • Microsoft Visual Basic 3.0 Professional Edition



This article was previously published under Q108036

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 query words: 3.00 docerr

Keywords: KB108036