diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/nw/nwscript/nwapi2.c | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to 'private/nw/nwscript/nwapi2.c')
-rw-r--r-- | private/nw/nwscript/nwapi2.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/private/nw/nwscript/nwapi2.c b/private/nw/nwscript/nwapi2.c new file mode 100644 index 000000000..31e0d669b --- /dev/null +++ b/private/nw/nwscript/nwapi2.c @@ -0,0 +1,49 @@ + +/************************************************************************* +* +* NWAPI2.C +* +* NetWare routines, ported from DOS +* +* Copyright (c) 1995 Microsoft Corporation +* +* $Log: N:\NT\PRIVATE\NW4\NWSCRIPT\VCS\NWAPI2.C $ +* +* Rev 1.1 22 Dec 1995 14:25:54 terryt +* Add Microsoft headers +* +* Rev 1.0 15 Nov 1995 18:07:34 terryt +* Initial revision. +* +* Rev 1.0 15 May 1995 19:10:50 terryt +* Initial revision. +* +*************************************************************************/ + +#include <direct.h> +#include "common.h" + +/* + Set the current drive to the login directory + of the default server. + */ +void SetLoginDirectory( PBYTE serverName ) +{ + unsigned int iRet = 0; + WORD firstDrive; + + if(iRet = GetFirstDrive (&firstDrive)) + { + DisplayError(iRet,"GetFirstDrive"); + return; + } + + // Nothing we can do if SetDriveBase failed. + // Don't report the error. + + if ( !( SetDriveBase (firstDrive, serverName, 0, "SYS:LOGIN") ) ) + { + _chdrive (firstDrive); + ExportCurrentDrive( firstDrive ); + } +} |