I’m using OpenTK OpenGL wrapper. Since it loads OpenGL dll (or .so on Linux) it contains a lot of DLL imported functions.
The trouble is, some drivers don’t export all of the functions. Is there a way to check if the entry point exists? I need to do this since actually calling the function on systems that have it will cause a crash if not done in the proper sequence. So catching EntryPointNotFound exception doesn’t work in my case.
You can P/Invoke the LoadLibrary and GetProcAddress calls from Win32:
Use LoadLibrary to load the module and get the handle, and GetProcAddress to get a function pointer to the entry point. If the latter returns an error, the entry point doesn’t exist.