Does LoadLibraryEx
function use side-by-side manifests? I have bar.dll with embedded SxS manifest, and that manifest describes version of this bar.dll, other dll file foo.dll has manifest that lists bar.dll as dependency, with specified version. But when I try to load bar.dll from foo.dll with LoadLibraryEx("bar.dll", NULL, 0)
I see (with enabled sls with gflags) that it ignores these manifests, and loads first version of bar.dll that it sees in searchpath, if I define ISOLATION_AWARE_ENABLED
and use LoadLibrary
it finds right version, but this ISOLATION_AWARE_ENABLED
doesn't affect behaviour of LoadLibraryEx
, I need to load right version with LoadLibraryEx
because LoadLibraryEx
is used implicitly for delayed loading of dll's. Is LoadLibraryEx
supposed to work like this, or is it some problem in my project configuration?
foo dll
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="foo" version="0.1.2.3" type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity name="bar" version="0.1.2.3" type="win32" />
</dependentAssembly>
</dependency>
<file name="foo.dll">
</file>
</assembly>
bar.dll
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="bar" version="0.1.2.3" type="win32"/>
<file name="bar.dll">
</file>
</assembly>
LoadLibrary
? sure that no. by default active is exe manifest. you need activate you foo.dll manifest before callLoadLibrary
and deactivate after. exactly this is doIsolationAwareLoadLibraryA
. so you need in fooentry point save activation context - by callGetCurrentActCtx
and then shellLoadLibrary
call intoActivateActCtx
DeactivateActCtx
– Pepi