amarquee.library/QRequestPrivilegesOp amarquee.library/QRequestPrivilegesOp
NAME
QRequestPrivilegesOp - Ask for special privileges/abilities.
SYNOPSIS
#include
LONG QRequestPrivilegesOp(struct QSession * session, ULONG privBits)
FUNCTION
This function lets your client ask the server for permission
to do certain operations that are otherwise restricted.
The server may or may not actually grant you permission.
NOTE
This function requires v45 of amarquee.library, and v1.45
of AMarqueed.
INPUTS
session - The session for which you wish to request privileges.
privBits - A bit-chord specifying which special privileges you want.
The following constants are currently available:
QPRIV_KILLCLIENTS - The ability to use QKillClientsOp to disconnect
other client programs.
QPRIV_SENDSYSMESSAGES - The ability to send system messages to
other client programs.
QPRIV_GETSYSMESSAGES - The ability to receive system messages
sent by other programs. (This privilege
is guaranteed to be granted to any client
that requests it)
QPRIV_ADMIN - The ability to change system settings via QSetParameterOp.
QPRIV_ALLPRIVILEGES - This constant is equivalent to all the above
constants OR'd together.
RESULTS
Returns the assigned ID number of the access operation, or 0
to indicate failure (due to memory shortage).
To find out if your requests were granted, call QInfoOp afterwards
and read the qr_Privs field of the returned struct to find your
new permissions status.
EXAMPLE
LONG transID;
/* Request the ability to get system messages and to disconnect other clients */
if (transID = QRequestPrivilegesOp(session, QPRIV_KILLCLIENTS | QPRIV_GETSYSMESSAGES))
printf("RequestPrivileges op succeeded, was given id #%li\n",transID);
else
printf("RequestPrivileges op failed. (no memory?)\n");
AREXX EXAMPLE
transID = QRequestPrivilegesOp(session, QPRIV_KILLCLIENTS | QPRIV_GETSYSMESSAGES)
if (transID = 0) then say "Oops, transaction failed."
SEE ALSO
QGo, QReleasePrivilegesOp, QKillClientsOp
Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.