Function 5F04h Delete Network Connection

mov si, seg LocalBuffer

mov ds, si

mov si, offset LocalBuffer ;ds:si points to local name

mov ax, 5F04h ;Delete Network Connection

int 21h

jc error_handler ;carry set means error

Delete Network Connection (Function 5F04h) deletes the connection to the network device and restores the redirected local device or drive.

Parameter

LocalBuffer

Points to a zero-terminated ASCII string that specifies the network connection to delete. LocalBuffer can specify one of the following:

The letter of a redirected drive, followed by a colon. MS-DOS cancels the redirection and restores the drive to its physical meaning.

The name of a redirected printer (PRN, LPT1, LPT2, LPT3, or their machine-specific equivalents). MS-DOS cancels the redirection and restores the printer name to its physical meaning.

A string starting with two backslashes (\\). MS-DOS terminates the connection between the local computer and the network directory.

Return Value

If the function is successful, the carry flag is clear. Otherwise, the carry flag is set and the AX register contains an error value, which may be one of the following:

Value Name

0001h ERROR_INVALID_FUNCTION
000Fh ERROR_INVALID_DRIVE

Comment

This function returns 0001h (ERROR_INVALID_FUNCTION) if the network is not running.

See Also

Function 5F03h Make Network Connection
Interrupt 2Fh Function 1100h Get Network Installed State