Establishes redirection across the network by associating a local device name with a network name. This function call is only available when Microsoft Networks is running and the file-sharing module (SHARE.EXE) has been loaded.
Call with:
AH = 5FH
AL = 03H
BL = device type
03H if printer
04H if drive
CX = parameter to save for caller
DS:SI = segment:offset of ASCIIZ local device name
ES:DI = segment:offset of ASCIIZ network name, followed by ASCIIZ
password
Returns:
If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The local name can be a drive designator (a letter followed by a colon, such as "D:"), a printer name, or a null string. Printer names must be one of the following: PRN, LPT1, LPT2, or LPT3. If a null string followed by a password is used, MS-DOS attempts to grant access to the network directory with the specified password.
The parameter passed in CX can be retrieved by later calls to Int 21H Function 5FH Subfunction 02H. It represents data that is private to the applications which store and retrieve it and has no meaning to MS-DOS.
Example:
Redirect the local drive E to the directory \FORTH on the server named LMI, using the password FRED.
locname db 'E:',0 ; local drive
netname db '\\LMI\FORTH',0
db 'FRED',0
.
.
.
mov ax,5f03h ; function & subfunction
mov bl,4 ; code 4 = disk drive
mov si,seg locname ; address of local name
mov ds,si
mov si,offset locname
mov di,seg netname ; address of network name
mov es,di
mov di,offset netname
int 21h ; transfer to MS-DOS
jc error ; jump if redirect failed
.
.
.