Are LoadLibrary description environment variables used, such as% windir%

If I execute , then Windows will load ONLY from "c: \ windows \ system32 \ ole32.dll"? Does LoadLibrary () in C also understand an environment variable? LoadLibrary("%windir%\\system32\\ole32.dll")

+5
source share
2 answers

as Serge said and thoroughly tested, LoadLibrary does not replace environment variables in the path.

but API Windows is a function to replace the environment variables in the rows: ExpandEnvironmentStrings(). You can make the required replacement on your way to the call LoadLibrary().

+6
source

The docs for LoadLibrary clearly state that:

, , .

, . , : , API .

BTW, , LoadLibrary() %windir%\blah.dll , UNC-. , , %windir%, !

: . = 126: .

+4

All Articles