Int 21H [3.1] Function 44H (68) Subfunction 0AH (10) IOCTL: check if handle is remote

Checks whether the specified handle refers to a file or device that is local (located on the PC that is running the program) or remote (located on a network server).

Call with:

AH = 44H

AL = 0AH

BX = handle

Returns:

If function successful

Carry flag = clear

DX = attribute word for file or device

bit 15 = 0 if local

1 if remote

If function unsuccessful

Carry flag = set

AX = error code

Notes:

Application programs should not ordinarily attempt to distinguish between files on local and remote devices.

If the network has not been started, control returns to the calling program with the carry flag set and error code 0001H (invalid function) in register AX.

Example:

Check if the handle saved in the variable fhandle is associated with a file or device on the machine running the program or on a network server.

fhandle dw ? ; device handle

.

.

.

mov ax,440ah ; function & subfunction

mov bx,fhandle ; file/device handle

int 21h ; transfer to MS-DOS

jc error ; jump if function failed

and dx,8000h ; test local/remote bit

jnz remote ; jump if network handle

.

.

.