Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Like function 5EH, function 5FH (decimal 95) consists of subfunctions used
  by programs running in a network. (See Figure 17-22.) In a network
  environment, DOS maintains an internal table of devices that can be shared
  across the network; this is called an assign list or redirection list. The
  table associates local logical names for such devices with their network
  names. These subfunctions give a program access to the table.

  Subfunction
  Hex     Dec              Description
  --------------------------------------------------------------------------
  02H     2                Get assign-list entry.
  03H     3                Make assign-list entry.
  04H     4                Cancel assign-list entry.
  --------------------------------------------------------------------------

  Figure 17-22.  Subfunctions available through interrupt 21H, function 5FH.

  Subfunction 02H. This subfunction obtains the local name and network name
  for one of the devices in the assign-list table. Call this subfunction
  with an assign-list index number in BX, with DS:SI pointing to an empty
  16-bit buffer, and with ES:DI pointing to an empty 128-byte buffer. The
  subfunction returns the local device name in the 16-bit buffer and the
  network name in the 128-byte buffer. The subfunction also indicates the
  device status in BH (00H = valid device, 01H = invalid device) and the
  device type in BL (03H = printer, 04H = disk drive), and it updates CX
  with the user parameter associated with the device through subfunction
  03H.

  Subfunction 02H is designed to let you step through the assign-list table.
  The first table entry's assign-list index is 0. By incrementing the
  assign-list index each time you call this subfunction, you can examine
  each table entry in turn. When you request a table entry past the end of
  the table, subfunction 02H sets the carry flag and returns an error code
  of 12H (no more files) in AX.

  Beware: A successful call to subfunction 02H changes DX and BP.

  Subfunction 03H. This subfunction redirects a local device to a network
  device. Call this subfunction with DS:SI containing the address of a
  16-byte buffer that contains an ASCIIZ local device name (e.g., PRN or E)
  and ES:DI pointing to a 128-byte buffer containing an ASCIIZ network
  device name followed by an ASCIIZ password. You must also specify the
  device type in BL (03H = printer, 04H = drive) and place a user parameter
  in CX. (This parameter should be 00H if you are using IBM's Local Area
  Network software.)

  If subfunction 03H successfully establishes redirection of input/output to
  the network device, it adds a corresponding entry to its assign-list table
  and clears the carry flag. If the operation fails, the carry flag is set,
  and AX contains an error code.

  Subfunction 04H. This subfunction cancels network redirection of a device
  and removes the corresponding assign-list table entry. Call it with DS:SI
  pointing to an ASCIIZ string that specifies the local device whose
  redirection you want canceled. If the operation is successful, subfunction
  04H clears the carry flag.

  Function 5FH is supported only in DOS versions 3.1 and later.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson