home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
capflg.exe
/
GETCAPFL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-29
|
3KB
|
122 lines
/****************************************************************************
** DISCLAIMER
**
** Novell, Inc. makes no representations or warranties with respect to
** any NetWare software, and specifically disclaims any express or
** implied warranties of merchantability, title, or fitness for a
** particular purpose.
**
** Distribution of any NetWare software is forbidden without the
** express written consent of Novell, Inc. Further, Novell reserves
** the right to discontinue distribution of any NetWare software.
**
** Novell is not responsible for lost profits or revenue, loss of use
** of the software, loss of data, costs of re-creating lost data, the
** cost of any substitute equipment or program, or claims by any party
** other than you. Novell strongly recommends a backup be made before
** any software is installed. Technical support for this software
** may be provided at the discretion of Novell.
****************************************************************************
#include <stdio.h>
#include <string.h>
#include <nwcalls.h>
void main (int argc, char *argv[])
{
NWCCODE ccode;
NWCAPTURE_FLAGSRW flags1;
NWCAPTURE_FLAGSRO flags2;
NWCONN_HANDLE conn;
if (argc != 3)
{
printf ("Usage: GETCAPFL <mode> <flag>\n\n");
printf ("<mode> CLEAR, SET, or TOGGLE\n");
printf ("<flag> RELEASE, SUPPRESS, NOTIFY, TAB, BANNER\n");
return;
}
ccode = NWCallsInit (NULL,NULL);
if (ccode) return;
ccode = NWGetDefaultConnectionID (&conn);
if (ccode) return;
ccode = NWGetCaptureFlags (0x01, &flags1, &flags2);
if (ccode) return;
if (stricmp (argv[1], "CLEAR") == 0)
{
if (stricmp (argv[2], "RELEASE") == 0)
{
flags1.printFlags &= 0xFFFB;
}
if (stricmp (argv[2], "SUPPRESS") == 0)
{
flags1.printFlags &= 0xFFF7;
}
if (stricmp (argv[2], "NOTIFY") == 0)
{
flags1.printFlags &= 0xFFEF;
}
if (stricmp (argv[2], "TAB") == 0)
{
flags1.printFlags &= 0xFFBF;
}
if (stricmp (argv[2], "BANNER") == 0)
{
flags1.printFlags &= 0xFF7F;
}
}
else if (stricmp (argv[1], "SET") == 0)
{
if (stricmp (argv[2], "RELEASE") == 0)
{
flags1.printFlags |= 0x0004;
}
if (stricmp (argv[2], "SUPPRESS") == 0)
{
flags1.printFlags |= 0x0008;
}
if (stricmp (argv[2], "NOTIFY") == 0)
{
flags1.printFlags |= 0x0010;
}
if (stricmp (argv[2], "TAB") == 0)
{
flags1.printFlags |= 0x0040;
}
if (stricmp (argv[2], "BANNER") == 0)
{
flags1.printFlags |= 0x0080;
}
}
else
{
if (stricmp (argv[2], "RELEASE") == 0)
{
flags1.printFlags ^= 0x0004;
}
if (stricmp (argv[2], "SUPPRESS") == 0)
{
flags1.printFlags ^= 0x0008;
}
if (stricmp (argv[2], "NOTIFY") == 0)
{
flags1.printFlags ^= 0x0010;
}
if (stricmp (argv[2], "TAB") == 0)
{
flags1.printFlags ^= 0x0040;
}
if (stricmp (argv[2], "BANNER") == 0)
{
flags1.printFlags ^= 0x0080;
}
}
ccode = NWSetCaptureFlags (conn, 0x01, &flags1);
if (ccode) return;
}