函数名: ioctl
功 能: 控制I/O设备
用 法: #include <io.h>
int ioctl(int handle, int cmd[,int *argdx, int argcx]);
程序例:
#include <stdio.h>
#include <dir.h>
#include <io.h>
int main(void)
{
int stat;
/* use func 8 to determine if the default drive is removable */
stat = ioctl(0, 8, 0, 0);
if (!stat)
printf("Drive %c is removable.\n", getdisk() + 'A');
else
printf("Drive %c is not removable.\n", getdisk() + 'A');
return 0;
}