1
\$\begingroup\$

I have been looking at the source code of various commercial games, and I have noticed that a lot of them load video card/input DLLs directly using LoadLibrary().

I wanted to mod one, but also make my own engine, so I was wondering what would be the benefits of loading DirectX 11 DLLs directly, as opposed to link the program with .libs?

\$\endgroup\$
4
\$\begingroup\$

If the DLLs are loaded using a .lib your game will fail to launch if the DLLs are missing.

Loading DLLs using LoadLibrary lets you display a friendlier message on failure and allows you implement a fallback system to a previous version of DirectX if the latest is unavailable.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.