Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>getdrivername() get current graphics driver name</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 getdrivername()         Get Current Graphics Driver Name

 #include   <graphics.h>

 char *far getdrivername(void);

        The getdrivername() function returns a pointer to a string
        holding the name of the current graphics driver.

    Returns:    A far pointer to a string which identifies the
                current driver.

   -------------------------------- Example ---------------------------------

        The following program initializes it and prints out the name
        of the current graphics driver.

 #include <graphics.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <conio.h>

 int main(void)

    char *namedriver;
    int gdriver = DETECT, grmode;

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

    namedriver = getdrivername();

    outtextxy(0, 0, namedriver);
    getch();
    closegraph();
    return 0;



See Also: initgraph()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson