Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>function 5f02h get assign-list entry dos 3.1+</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 5F02h          Get Assign-List Entry                        DOS 3.1+

    Returns the local and network names of a device, such as a network
    printer. DOS uses the assign-list index (set by function 5F03h) to
    search a list of network connections.

        Entry   AX = 5F02h
                BX    = Assign-list index
                DS:SI = Pointer to a 16-byte buffer for local device name
                ES:DI = Pointer to a 128-byte buffer for network name

        Return  Buffers filled with ASCIIZ names
                BH = 0 | 1   Device valid | invalid
                BL = Device type
                     | 3 = printer
                     | 4 = drive
                CX = Value stored by function 5F03h
                DX,BP changed
                or
                AX = Error code, if CF is set
                     | 01h Invalid function (Network not running)
                     | 12h No more files

    ------------------------------------------------------------------

    DOS maintains one assign-list entry for each of the currently
    connected network devices. As a program connects and disconnects
    network devices, DOS adds and deletes entries from the list. Each
    entry receives an assign-list index. The assign-list indexes are
    zero-based and consecutive--the first network device to be
    connected receives index 0, the second receives index 1, and so
    on.
    When a program disconnects a network device, DOS reindexes the
    entries so that the indexes remain consecutive. To determine the
    current index for a device, a program typically retrieves
    assign-list entries for each index, starting with 0, until it
    matches either the user value returned in the CX register or the
    network name pointed to by the ES:DI registers.

See Also: 5f03h 5f04h

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