函数名: bdosptr
功 能: DOS系统调用
用 法: #include <dos.h>
int bdosptr(int dosfun, void *argument, unsigned dosal);
程序例:
#include <string.h>
#include <stdio.h>
#include <dir.h>
#include <dos.h>
#include <errno.h>
#include <stdlib.h>
#define BUFLEN 80
int main(void)
{
char buffer[BUFLEN];
int test;
printf("Enter full pathname of a directory\n");
gets(buffer);
test = bdosptr(0x3B,buffer,0);
if(test)
{
printf("DOS error message: %d\n", errno);
/* See errno.h for error listings */
exit (1);
}
getcwd(buffer, BUFLEN);
printf("The current directory is: %s\n", buffer);
return 0;
}