函式名
bdosptr功能
DOS系統調用
函式語法
int bdosptr(int dosfun, void *argument, unsigned dosal);
程式演示
#include
#include
#include
#include
#include
#include
#define BUFLEN 80
int main(void)
{
char buffer【BUFLEN】;
int test;
printf("Enter fullpathname of a directory\n");
gets(buffer);
test = bdosptr(0x3B,buffer,0);
if(test)
{
printf("DOSerror 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;
}