On Linux and Mac, when using `dlopen()` to load a shared library that links to another library, if linking fails because of a missing symbol, you can get the name of the missing symbol with `dlerror()`. It says something like

```
dlopen failed: cannot locate symbol "foo"

```

On Windows, when using `LoadLibrary()` to load a DLL with a missing symbol, you can only get an error code from `GetLastError()` which for this type of issue will always be 127. How can I figure out which symbol is missing, or a more verbose error message from `LoadLibrary()` that explains why the function failed?