Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

  1. /*************************************************************************
  2. *
  3. * NWAPI2.C
  4. *
  5. * NetWare routines, ported from DOS
  6. *
  7. * Copyright (c) 1995 Microsoft Corporation
  8. *
  9. * $Log: N:\NT\PRIVATE\NW4\NWSCRIPT\VCS\NWAPI2.C $
  10. *
  11. * Rev 1.1 22 Dec 1995 14:25:54 terryt
  12. * Add Microsoft headers
  13. *
  14. * Rev 1.0 15 Nov 1995 18:07:34 terryt
  15. * Initial revision.
  16. *
  17. * Rev 1.0 15 May 1995 19:10:50 terryt
  18. * Initial revision.
  19. *
  20. *************************************************************************/
  21. #include <direct.h>
  22. #include "common.h"
  23. /*
  24. Set the current drive to the login directory
  25. of the default server.
  26. */
  27. void SetLoginDirectory( PBYTE serverName )
  28. {
  29. unsigned int iRet = 0;
  30. WORD firstDrive;
  31. if(iRet = GetFirstDrive (&firstDrive))
  32. {
  33. DisplayError(iRet,"GetFirstDrive");
  34. return;
  35. }
  36. // Nothing we can do if SetDriveBase failed.
  37. // Don't report the error.
  38. if ( !( SetDriveBase (firstDrive, serverName, 0, "SYS:LOGIN") ) )
  39. {
  40. _chdrive (firstDrive);
  41. ExportCurrentDrive( firstDrive );
  42. }
  43. }