Int 21H [3.1] Function 5FH (95) Subfunction 04H Cancel device redirection

Cancels a previous redirection request by removing the association of 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 = 04H

DS:SI = segment:offset of ASCIIZ local device name

Returns:

If function successful

Carry flag = clear

If function unsuccessful

Carry flag = set

AX = error code

Note:

The supplied name can be a drive designator (a letter followed by a colon, such as "D:"), a printer name, or a string starting with two backslashes (\\). Printer names must be one of the following: PRN, LPT1, LPT2, or LPT3. If the string with two backslashes is used, the connection between the local machine and the network directory is terminated.

Example:

Cancel the redirection of local drive E to the network server.

locname db 'E:',0

.

.

. mov ax,5f04h ; function & subfunction

mov si,seg locname ; address of local name

mov ds,si

mov si,offset locname

int 21h ; transfer to MS-DOS

jc error ; jump if cancel failed

.

.

.