Function 440Bh Set Sharing Retry Count

mov cx, cPause ;number of times through pause loop

mov dx, cRetries ;number of times to retry file operation

mov ax, 440Bh ;Set Sharing Retry Count

int 21h

jc error_handler ;carry set means error

Set Sharing Retry Count (Function 440Bh) sets the number of times MS-DOS retries a disk operation after a failure caused by a file-sharing operation. When the number of retries is reached without success, MS-DOS returns an error value to the program that requested the disk operation.

Parameters

cPause

Specifies the number of times MS-DOS is to go through a pause loop, thereby controlling the amount of time between retries.

cRetries

Specifies the number of times MS-DOS retries the file operation before returning an error value.

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 0001h (ERROR_INVALID_FUNCTION).

Comments

Set Sharing Retry Count returns 0001h (ERROR_INVALID_FUNCTION) if file sharing is not active (SHARE.EXE has not been loaded).

The pause time depends on the computer's clock speed. The default sharing retry count is 3; the default number of times between retries is 1. If a program changes the retry count or pause value, it should restore the default values before terminating.

See Also

Function 5Ch Lock/Unlock File
Interrupt 2Fh Function 1000h Get SHARE.EXE Installed State