[Bug 13915] Oblivon Script Extender (OBSE) fails to start ("privileged instruction")

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Aug 23 17:02:05 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=13915





--- Comment #53 from Anastasius Focht <focht at gmx.net>  2010-08-23 17:02:04 ---
Hello,

well, if you don't want to change much you should use a more reliable method of
getting kernel32 base/address of "LoadLibraryA" entry point.
There exist a several methods - though some don't work in Wine (yet) ;-)

One approach is to use psapi' EnumProcessModules() for getting the module list
(and load base addresses) in the remote process.

You could write a small helper function that uses the API and filters for
kernel32 base. 
To get the address of the "LoadLibraryA" function entry point in remote process
you just need to know the offset to the PE load base.
Subtract the locally retrieved "LoadLibraryA" entry point address from local
kernel32 base -> offset. Use that offset and the remote load base address to
calculate the virtual address for "LoadLibraryA" in remote process.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list