Microsoft KB Archive/174883: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 75: Line 75:
There is an incomplete declare statement in the API Viewer for the ExitWindows() function.<br />
There is an incomplete declare statement in the API Viewer for the ExitWindows() function.<br />
<br />
<br />
To use this function correctly, add 'Alias &quot;ExitWindowsEx&quot; ' to the function declaration so the declare statement is as follows:<br />
To use this function correctly, add 'Alias "ExitWindowsEx" ' to the function declaration so the declare statement is as follows:<br />


<pre class="codesample">  Declare Function ExitWindows Lib &quot;user32&quot; Alias &quot;ExitWindowsEx&quot; (ByVal _
<pre class="codesample">  Declare Function ExitWindows Lib "user32" Alias "ExitWindowsEx" (ByVal _
   dwReserved As Long, ByVal uReturnCode As Long) As Long
   dwReserved As Long, ByVal uReturnCode As Long) As Long
                 </pre>
                 </pre>
Line 88: Line 88:
== REFERENCES ==
== REFERENCES ==


To learn more about the API Text Viewer, select the &quot;Books on Line&quot; option from the Help menu, and in the &quot;Find&quot; text box enter the search criterion &quot;api&quot; (without the quotes.) The first item under the &quot;Visual Basic Books OnLine&quot; node will be the topic &quot;Accessing the Microsoft Windows API.&quot;<br />
To learn more about the API Text Viewer, select the "Books on Line" option from the Help menu, and in the "Find" text box enter the search criterion "api" (without the quotes.) The first item under the "Visual Basic Books OnLine" node will be the topic "Accessing the Microsoft Windows API."<br />
<br />
<br />
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

Latest revision as of 11:07, 21 July 2020

Knowledge Base


DOC: ExitWindows Function Declaration Incorrect in API Viewer

Article ID: 174883

Article Last Modified on 4/18/2003



APPLIES TO

  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition



This article was previously published under Q174883

SUMMARY

One of the following errors may occur when you use the ExitWindows API function declaration from the API Text Viewer.

Run-time error '453':
Specified DLL function not found

- or -


Run-time error '453':
Can't find DLL entry point ExitWindows in user32

MORE INFORMATION

There is an incomplete declare statement in the API Viewer for the ExitWindows() function.

To use this function correctly, add 'Alias "ExitWindowsEx" ' to the function declaration so the declare statement is as follows:

   Declare Function ExitWindows Lib "user32" Alias "ExitWindowsEx" (ByVal _
   dwReserved As Long, ByVal uReturnCode As Long) As Long
                


You can also change the statement in the file win32api.txt so the next time you use the API Text Viewer, the Declare statement will be correct.

REFERENCES

To learn more about the API Text Viewer, select the "Books on Line" option from the Help menu, and in the "Find" text box enter the search criterion "api" (without the quotes.) The first item under the "Visual Basic Books OnLine" node will be the topic "Accessing the Microsoft Windows API."

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

168796 HOWTO: Programmatically Restart or Log Off a Computer


Keywords: kbbug kbapi kbdocerr KB174883