[Lazarus] WinINet STDCALL callback crash

Ludo Brands ludo.brands at free.fr
Fri Mar 15 17:24:28 CET 2013


On 03/15/2013 12:27 PM, Benito van der Zander wrote:
> 
>> If you run on Win64 then SEH can cause crashes with dll's. Latest FPC
>> from trunk (2.7.1) enables SEH on win64 by default.
> What kind of crashes? If compiled for win64, or run there?
Google for site:bugs.freepascal.org SEH win64 to get a list. FPC for
WIn64 used a different exception handling which resulted in getting
exceptions generated in dll's which where supposed to be caught inside
the dll. Exceptions it didn't know what to do with.

> But the crashes in 2.6 would be unrelated, wouldn't they?
Any exception generated in a non FPC dll code could crash your FPC win64
application with 2.6.0. Since the exception points to a call to external
code, you just don't know.

>> Why don't you use a sync library such as synapse
>> (http://synapse.ararat.cz/doku.php) in your thread?
> These kinds of libraries never work so well with https.
> You need to install openssl, set the ssl version manually when the
> detection fails sometimes,
> and afair it never checks if the ssl certificate is actually valid.
I personally contributed the code for certificate checking to synapse
more than a year ago ;)
Yes you need a list of root CA's such as the mozilla one because openssl
doesn't come with a list. But at least you get the opportunity to use an
updated one. I can't remember when Microsoft updated the root CA list
for XP.

> wininet checks it against the certificates allowed on the machine.
> 
Don't get me wrong. If wininet is working for you, so much the better.
Only when it goes wrong, as in OP's case, there is only so much you can
do with a closed source library.

Ludo






More information about the Lazarus mailing list