Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_secure( [ <noption> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_SECURE( [ <nOption> ] )


Parameters

<nOption>
Action desired. Valid settings are described below.


Returns

Current option, as a numeric value.


Description

This function offers Secure Net protection by enabling your application 
to logout and/or reboot in the event of a program abend or critical 
error. This is particularly useful if you have used N_LOGIN() to log 
the program into the network and do not want a user to be able to 
execute DOS commands under the current LOGIN if the application ends 
abnormally.

Note  If you have issued a Secure Net instruction, make sure to 
disable it before ending your application normally, unless you actually 
want the action to take place.

Valid settings for <nOption> are the values listed in the table below, 
or a combination of them.

Value    Operation performed
1        Logs the user out of all file servers. On a 
         NetBios network, this has the effect of 
         terminating all device redirections.

2        Performs a warm boot.

4        Performs a cold boot.

0        Disables Secure Net event trapping.


To combine operations, add their values together. For instance, 
N_SECURE(3) means log out of all file servers and perform a 
warm boot. (Obviously, 2 + 4 is not a valid combination.)


Examples

// In the event of abnormal program
// termination, logout and reboot.
N_SECURE(3)
.
.
.
// Normal program termination
PROCEDURE EndProgram
   CLOSE ALL
   N_LOGOUT()
   N_SECURE(0) // Disable Secure Net.
   QUIT



See Also: N_LOGIN() N_LOGOUT() N_ONQUIT() N_INWIN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson