Can someone please explain to me what "_declspec(dllimport)", "__declspec(dllexport)" (both of which are just "export" in D) are for, what the ".def" files (which are supposed to be if the __declspec(whatever) are missing) are for, what is an import library and how this all makes sense.

I googled for it, but no clear answer.
On an example of, let's say, OpenGL32.dll, the source and object files of which are unavailable, what options there are to use it besides manually GetProcAddress-ing every function?

This is a question from someone, who has never used DLLs other then with GetProcAddress.

This is important for the OpenGL bindings I'm making and I want to preserve the headers exactly as they are. But they contain __declspec(dllexport), which I need to understand. That's why this forum post exists.

Please help!

--
Bye,
Gor Gyolchanyan.