HOWTO: Exit Windows from a Visual Basic 4.0 ApplicationLast reviewed: November 17, 1997Article ID: Q129637 |
4.00
WINDOWS
kbprg
The information in this article applies to:
SUMMARYThis article shows by example how to exit Windows from a Visual Basic version 4.0 application.
MORE INFORMATIONWhen you make calls to Windows APIs from the 32-bit version of Microsoft Visual Basic version 4.0, note that the functions being called reside in the 32-bit DLLs of the Win32 Operating System. Therefore, it is no longer possible to call the ExitWindows API function directly from Visual Basic because there is no ExitWindows entry point in USER32.EXE on Win32 Operating Systems. This is a change in behaviour from previous versions of Visual Basic. Under Win32 Operating Systems, ExitWindows is a C++ macro in the WINUSER.H header file that maps to the ExitWindowsEx API:
#define EWX_LOGOFF 0 #define ExitWindows(dwReserved,Code) ExitWindowsEx(EWX_LOGOFF, _ 0xFFFFFFFF)When calling this function from the 32-bit version of Visual Basic version 4.0, you must use the equivalent Declare statement.
Step-by-Step Example
|
Additional reference words: 4.00 terminate end quit stop vb4win vb432
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |