If I do LoadLibrary("%windir%\\system32\\ole32.dll") does that mean Windows will ONLY load from “c:\windows\system32\ole32.dll” ? Also does LoadLibrary() in C understand the environment variable?
If I do LoadLibrary(%windir%\\system32\\ole32.dll) does that mean Windows will ONLY load from c:\windows\system32\ole32.dll ?
Share
as Serge said and carefully tested, LoadLibrary does not do environment variable substitution in path.
however, there is a function in the windows API to replace environment variables in strings:
ExpandEnvironmentStrings(). you can perform the required substitution on your path before callingLoadLibrary().