Hi
Re a reboot in Code...
I found this..
MY QUESTIONS: Can this be rewritten if necessary to run from a NT app and if so where do I source the Windows API Windows.inc
I copy and paste -
"In Clarion, you can reboot a computer using the EXECUTE statement to run the appropriate system command. Here?s how you can do it:
clarion
Copy code
PROGRAM
MAP
END
CODE
INCLUDE('windows.inc') ! Include Windows API declarations
MAP
MODULE('kernel32.dll')
ExitWindowsEx(*CSTRING),BOOL,PROC
END
END
CODE
IF ExitWindowsEx('0', TRUE)
MESSAGE('Reboot initiated successfully.')
ELSE
MESSAGE('Failed to initiate reboot.')
END
END
Explanation:
Windows API Declaration (windows.inc):
The INCLUDE('windows.inc') statement includes the necessary Windows API declarations needed for ExitWindowsEx.
ExitWindowsEx Function:
ExitWindowsEx is a Windows API function that can be used to shut down or reboot a computer. In this case, '0' is used to indicate a reboot.
Execution:
The ExitWindowsEx('0', TRUE) line attempts to initiate a reboot ('0' means reboot, TRUE means force reboot if necessary).
Message Handling:
Depending on the result of ExitWindowsEx, appropriate messages are displayed to indicate whether the reboot was successful or not."
Thanks
Richard