Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function fTerminateWin doesn't work in Access 2.0

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Anybody knows the reason this function works in Access 97 but not in Access 2.0? (obtained from Access Web - FAQ)

Thank you.

'**************** Code Begin *******************
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code courtesy of
'Dev Ashish
'
Private Declare Function apiExitWindowsEx Lib "user32" _
Alias "ExitWindowsEx" _
(ByVal uFlags As Long, ByVal dwReserved As Long) _
As Long

Public Const EWX_FORCE = 4 'Forcibly terminates processes
'that do not respond.
Public Const EWX_LOGOFF = 0 'Terminates processes, then logs off.
Public Const EWX_SHUTDOWN = 1 'Powers the system off, if possible.
Public Const EWX_REBOOT = 2 'Reboots the system.

Function fTerminateWin(lngExitVal As Long)
fTerminateWin = apiExitWindowsEx(lngExitVal, 0)
End Function
'***************** Code End *******************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top