home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11922 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.1 KB  |  67 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!gateway.univel.com!ns.novell.com!novdpd!jhaide
  3. From: jhaide@novell.com (Janos Haide)
  4. Subject: Re: HELP: How does one identify a drive as a Novell network drive?
  5. Message-ID: <1993Jan8.161458.4758@novell.com>
  6. Organization: Novell, Inc. --Austin
  7. References: <2TP1wB4w165w@cibbs.UUCP>
  8. Date: Fri, 8 Jan 1993 16:14:58 GMT
  9. Lines: 56
  10.  
  11. In article <2TP1wB4w165w@cibbs.UUCP> root@cibbs.UUCP writes:
  12. >I am attempting to determine how to look at say teh DOS media descriptor for a
  13. >drive in memory to determine if this is a network drive. I've posted about this
  14. >before and got no response.
  15. >
  16. >Anyone what to look for? I have used my resources regarding DOS programming and
  17. >they never mention network drives.
  18. >
  19. >Someone in here once posted that they were able to make a change to the media
  20. >descriptor to make DOS this that a network drive was a hard drive. Obvoisuly
  21. >this is possible, but what would information would one look for determining if
  22. >a drive was on the network, or local?
  23. >
  24. >Any informaion regarding this would be appreciated.
  25. >Mark
  26. >
  27. >----
  28. >Club InSaNiTy BBS   |   BBS:+1 416 691 0679 |   root@cibbs.UUCP
  29. >DataSoft Consulting | Voice:+1 416 691 5529 |   uunorth!cibbs!root
  30. >Mark Buckaway       | Toronto, Ont. CANADA  |   1@4653 (WWIVnet)
  31.  
  32. Mark,
  33.  
  34. Here is a code snippet from Al Stevens' DFlat library that might help.
  35.  
  36.  /* ---- test for network or RAM disk ---- */
  37.  regs.x.ax = 0x4409;     /* IOCTL func 9 */
  38.  regs.h.bl = dr+1;
  39.  int86(DOS, ®s, ®s);
  40.  if (!regs.x.cflag)    {
  41.      if (regs.x.dx & 0x1000)
  42.          strcat(drname, " (Network)");
  43.      else if (regs.x.dx == 0x0800)
  44.          strcat(drname, " (RAMdisk)");
  45.  }
  46.  
  47. Now, how do you know it's a Novell network drive :
  48. Check if you'se running on top of a Novell network.
  49.  
  50. If you're sure that you're running Netware, here's an alternate method:
  51.  
  52. mov ax, e900
  53. mov dx, drivenum ; a: = 0 ...
  54. int 21
  55.  
  56. on return ah has the drive flags:
  57. bit 0: perm. handle
  58. bit 1: temp handle (both mean NetWare drives)
  59. bit 7: local drive
  60.  
  61. Hope this helps,
  62. Janos
  63. jhaide@novell.com
  64.  
  65. disclaimer!
  66.  
  67.