40 lines
971 B
ObjectPascal
40 lines
971 B
ObjectPascal
{$X+,B-,V-} {essential compiler directives}
|
|
|
|
program loglock;
|
|
|
|
{ Example for the nwServ unit / NwTP 0.6 API. (c) 1993,1995, R.Spronk }
|
|
|
|
{ Purpose: This program toggles the login status..
|
|
If User Login was enabled, it will be diabled and v.v. }
|
|
|
|
{ Tests the following nwServ functions:
|
|
|
|
DisableFileServerLogin
|
|
EnableFileServerLogin
|
|
GetFileServerLoginStatus
|
|
}
|
|
|
|
uses nwMisc,nwServ;
|
|
|
|
Var allowed:boolean;
|
|
|
|
begin
|
|
IF GetFileServerLoginStatus(allowed)
|
|
then begin
|
|
if allowed
|
|
then begin
|
|
DisableFileServerLogin;
|
|
writeln('Login Disabled.')
|
|
end
|
|
else begin
|
|
EnableFileserverLogin;
|
|
writeln('Login Enabled.')
|
|
end
|
|
end
|
|
else begin
|
|
if nwServ.result=$C6
|
|
then writeln('You need console operator rights to run this utility.')
|
|
else writeln('GetFileserverLoginStatus Error : $',HexStr(nwServ.result,2));
|
|
end;
|
|
end.
|