I have a native C++ app.
This app uses LoadLibrary()/GetProcaddress() to optionally load a C++/CLI wrapper dll which calls a .NET 4 class library.

Everything works fine if .NET 4 is installed.

When .NET 4 isn't installed. The LoadLibrary() of the C++/CLI wrapper DLL and and GetProcAddress() of the exported function(s) succeeds. (I would have thought the loadlibrary would fail because the dependant .NET 4 isn't available).
However calling the exported functions causes the application to crash with exception code 0xe0434f4d

What is the proper way to handle this situation ?
- Programmatically check if .NET 4 is installed ? (if so, what is the recommended way to do this ?)
- put a SEH __try/__except around the LoadLibrary/GetProcAddress/ call exported function ?
- somehow check/catch this in the C++/CLI wrapper (if so, how ?)
- somethign else ?