什么是installuserdriver

核心提示installuserdriver是一个计算机系统函数,主要功能是安装设备驱动程序到BG。中文名installuserdriver功 能: 安装设备驱动程序到BG用 法: int far installuserdriver对象#includ

最佳答案:

installuserdriver是一个计算机系统函数,主要功能是安装设备驱动程序到BG。

详情介绍

installuserdriver是一个计算机系统函数,主要功能是安装设备驱动程序到BG。

中文名
installuserdriver
功 能
: 安装设备驱动程序到BG
用 法
: int far installuserdriver
对象
#include graphics.h>

installuserdriver函数名

installuserdriver

installuserdriver功能

安装设备驱动程序到BGI设备驱动程序表中

installuserdriver简介

用 法: int far installuserdriver(char far *name, int (*detect)(void));

程序例:

#include <graphics.h>

#include

#include

#include

int huge detectEGA(void);

void checkerrors(void);

int main(void)

{

int gdriver, gmode;

gdriver = installuserdriver("EGA", detectEGA);

gdriver = DETECT;

checkerrors();

initgraph(&gdriver, &gmode, "");

checkerrors();

line(0, 0, getmaxx(), getmaxy());

getch();

closegraph();

return 0;

}

int huge detectEGA(void)

{

int driver, mode, sugmode = 0;

detectgraph(&driver, &mode);

if ((driver == EGA) || (driver == VGA))

return sugmode;

else

return grError;

}

void checkerrors(void)

{

int errorcode;

errorcode = graphresult();

if (errorcode != grOk)

{

printf("Graphics error: %sn", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1);

}

}

 
友情链接
鄂ICP备19019357号-22