/*  Development Environment:
	BC++ 3.1, DOS 5.0, Novell Netware 3.11,
	Novell Netware Client API 1.0e

	Thomas H. Smith / Weirton Steel Corp. [70674,3300]

	This program demonstrates resetting the path for a drive
	allocated through the NWSetDriveBase function.  The code within
	the accompanying NET_ENV.CPP was generally made by
	Peter Thomas [75716,2377] in the GBL_ENV.C program of GBLENV.ARC
	from the 'BCPPDOS' section.  GBL_ENV.C is a translation of SETPATH.PAS by
	David Dubois [71401,747].

	The assembly code within the Mstr_FindEnvironment() function,
	within NET_ENV.CPP, is from RESETMAP.C by Vitek Boruvka, found
	in NOVLIB.

	Place your server name in the 'server[] = "" ' variable.

	Program is written with presumption that SYS:PUBLIC exists.
	To be run after user is logged in.
*/

None of the files included may be sold to others.  If any copies or
segments of the NET_ENV.CPP program are reused the names and user IDs
of the following editors must be included:

	David Dubois [71401,747]       Peter Thomas [75716,2377]
	Vitek Boruvka                  Thomas H. Smith [70674,3300]


Resetmap.cpp and gbl_env.c are not part of the project.  They are include
to let users see origins of code referred to below.

Personal setup of directories:
program - d:\bcpp\progs
include - d:\bcpp\include;d:\bcpp\classlib\include;d:\bcpp\nov\include;
		d:\bcpp\progs
library - d:\bcpp\lib;d:\bcpp\classlib\lib;d:\bcpp\nov\lib;

program/compiler settings:
include - ..\include;..\classlib\include;..\nov\include;.
Library - ..\lib;..\classlib\lib;..\nov\lib

Notes:
If there is a method of resetting the path through the use of the
NWSetSearchDriveVector() function call please inform me of it.

The functions within NET_ENV.CPP can be used to alter any part
of the DOS/NETX environment.  This program works with both NETX.COM
and NET5.COM.

It _appears_ that the interrupt 21, BA function returns address of 
the NETX.COM environment. It does NOT get the COMMAND.COM environment.
This program is segments of a longer one written to automatically
log in, map the network drives (thru NWSetDriveBase), reset the
path - to remain effective after program termination, and connect
to a printer queue.  

Making permanent changes to the DOS environment is not a normal C 
program function.

The first attempt at an automatic login used code from GBL_ENV.C for 
finding the environment.  It returns a pointer to the COMMAND.COM 
environment.  If the automatic login was placed in AUTOEXEC.BAT it 
would have odd effects on the PC, sometimes locking it up on Boot.  
Yet, this program would run fine from the DOS prompt.  Deduction - 
COMMAND.COM, which invokes the AUTOEXEC.BAT file was not yet 
in the TSR stage, and/or the environment area of COMMAND.COM was 
not completed while the automatic login was attempting to modify it.  
The automatic login program worked from within AUTOEXEC.BAT after 
substituting the original code of the Mstr_FindEnvironment() function 
with assembler code from RESETMAP.C, 
procedure char far *_GetMasterEnvPntr(WORD *maxEnvSize) .

P.S. I am currently a employed as a FoxPro/dBase programmer with 
professional experience in Netware Administration, personal experience 
in C/C++ (DOS and Windows), assembly, and am looking for 
employment openings in C/C++ programming [01/29/94].
Thomas H. Smith [70674, 3300]
(304)797-2236 work, (304)723-0670, Weirton, WV,  EST.
