What is graphic device interface (GDI)?

GDI is nothing but Graphic Device Interface.
In window system you need GDI to control the display of text and graphics.
You need to know about the GDI drivers before you go deeper into the GDI interfacing.
GDI provides several built in functions and structures.

You can display the grafic outputs on displays, printers and other output devices.
These GDI functions are used for various graphical purposes. They are used to draw lines,
curves,bitmaps,images and many more objects.You get various tools for drawing purposes like pens, pencil, paint brush,spray,fillers etc. You also have differnet fonts and font styles to write text with various styles.

Our windows system also comes with a GDI with colourful graphics but it has limited resources.
Applications have the privilege to direct the output to either the devices like printers or memory drive.
But this device is detected by the application handler pointing to the device context created in the software.
This device context will contain certain control functions that specifies which device has to be used for display.

You can very well refer to the msdn link below for more info on device interfaces and GDI.
http://msdn2.microsoft.com/en-us/library/default.a spx