OpenGL detection under Windows

Hi,
I would like to know how to detect Opengl under Windows. I need to detect basic extensions but the program crashes on some PCs with Windows installed. The problem occures mainly on Windows 95 an 98.