When I LoadLibraryEx with LOAD_LIBRARY_AS_IMAGE_RESOURCE flag, the
returned hMod flag is the normal image base value + 2.
Example: LoadLibrary("f.dll") -> base = 0x10000000
LoadLibraryEx("f.dll", LOAD_LIBRARY_AS_IMAGE_RESOURCE) -> base =
0x10000002
It is a bit misleading because I am trying to find the RVA of a given
resource and if I use the hMod I will get an off by two RVA.
(The flag DONT_RESOLVE_DLL_REFERENCES works fine, but what about the
aforementioned flag?)
Please advise.
--
Elias
Not entirely sure I understand what you're trying to do...
but perhaps you can use the MapAndLoad function instead (from
imagehlp)?
And then use other functions, such as ImageRvaToVa(), to navigate
round the data.
Regards,
Roger.