home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_02_11
/
2n11066a
< prev
next >
Wrap
Text File
|
1991-09-09
|
473b
|
26 lines
/*
* Check for NetWare connection
* (written for Borland C)
*/
#include <stdio.h>
#include <dos.h>
struct REGPACK r; /* make 80x86 registers available */
int main(void)
{
r.r_ax = 0xDC00;
intr(0x21,&r); /* Get connection number */
if ((r.r_ax & 0x00FF) > 0)
printf("You have NetWare connection #%d.\n",(r.r_ax & 0x00FF));
else
{
puts("You're not logged in to a NetWare LAN.");
return(1);
}
return(0);
}