Go to the first, previous, next, last section, table of contents.
#include <io.h> short _get_dev_info(int handle);
Given a file handle in handle, this function returns the info word
from DOS IOCTL function 0 (Int 21h/AX=4400h). handle must refer
to an open file or device, otherwise the call will fail (and set
errno to EBADF
).
In case of success, the returned value is the coded information from the system about the character device or the file which is referenced by the file handle handle. The following table shows the meaning of the individual bits in the return value:
For a character device:
Return Value
The device information word described above. In case of error, -1 is
returned and errno is set to EBADF
.
Portability not ANSI, not POSIX
Example
int fd = open ("CLOCK$", O_RDONLY | O_BINARY); int clock_info = _get_dev_info (fd);
Go to the first, previous, next, last section, table of contents.