[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-windows
Subject:    Re: [PATCH] kdecore crashes LoadLibrary calls
From:       Ralf Habacker <ralf.habacker () freenet ! de>
Date:       2009-03-31 19:42:20
Message-ID: 49D2721C.8010400 () freenet ! de
[Download RAW message or body]

Patrick Spendrin schrieb:
> Hi,
>
> I have a small patch here which fixes a problem I recently got aware of:
> if you try to make a regsvr32 kdecore.dll it will fail saying that
> LoadLibrary was not achieved (simply try it). The correct error message
> would have been a missing entrypoint for DllRegisterServer though.
> After searching for quite a while I found the problem:
> When you load kdecore linked to an executable, the image will be located
> at the address 0x0040000. When you load kdecore directly via regsvr32,
> the image will have the address 0x10000000 (0x1 0x0) instead.
> When trying to read from the first one then you will obviously get a
> "crash". As I am unable to find out where our image is (this is the
> address of the HINSTANCE parameter in the DllMain) as the constructor of
> the static class will be called before running the DllMain, I have now
> changed it so that the code will be called from the DllMain with the
> parameter.
>
> As this patch might change the behaviour of your debug output, please
> check if it works for you | comment it.
>   
patch is committed.

Ralf

_______________________________________________
Kde-windows mailing list
Kde-windows@kde.org
https://mail.kde.org/mailman/listinfo/kde-windows
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic