#1 2020-08-14 10:22:16

larand54
Member
Registered: 2018-12-25
Posts: 104

SynCrtSock error 12019 when run in a VCL-app

When executing TWinHTTP.Post I get this error when run in a VCL app but if I run an excact copy of the code in a console-app it works.
I have debuged but can't find out what causes this.
Nice if someone have a clue to work on..

I have DELPHI-10.3 in this case and the latest version of WIN10.

I've debugged a bit deeper and found that in the initialization of connection properties there is a selection using Automatic proxy or no proxy. This is controled by OS-Version.
If i run the VCL-app I get major-version=10 and minor=3 but in the console app I get Major=6 and Minor=2 and in that case I get NO_PROXY but in the VCL-app I get Automatic_Proxy.

And if I changed the value from Auto to NO-proxy, using debugger,  it works with the VCL-version.

I have no idea why it is like that and why it won't work with automatic_proxy.
I don't want to change anything in SynCrtSock so I still need some help.

Last edited by larand54 (2020-08-14 16:06:48)


Delphi-11, WIN10

Offline

#2 2020-08-14 19:44:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,653
Website

Re: SynCrtSock error 12019 when run in a VCL-app

Ensure you use the {$R Vista.res} resource within all .dpr.
Otherwise Windows 10 is not properly detected.

Offline

#3 2020-08-14 20:09:47

larand54
Member
Registered: 2018-12-25
Posts: 104

Re: SynCrtSock error 12019 when run in a VCL-app

Ok, but it won't help me as it only works when WIN10 is not detected.
HttpRequest gives error when proxy is set to auto which it is when WIN10 is detected.

What can make it do that? I suppose it normally works with win10?

And when I added "{$R Vista.res}" into the console project it stopped work.

Last edited by larand54 (2020-08-14 21:16:26)


Delphi-11, WIN10

Offline

#4 2020-08-15 07:31:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,653
Website

Re: SynCrtSock error 12019 when run in a VCL-app

Sounds really like a configuration issue of the system itself.
The registry doesn't have the proxy information when access in native Windows 10 mode.
I don't know how to fix it...

Did you try on another computers?

Offline

#5 2020-08-15 10:33:14

larand54
Member
Registered: 2018-12-25
Posts: 104

Re: SynCrtSock error 12019 when run in a VCL-app

Found the reason... it was a setting called "Use a Proxy" that was on. I never ever used a proxy before... just don't have a clue on how it was set.
Well, that's it.
Thank's a lot.


Delphi-11, WIN10

Offline

Board footer

Powered by FluxBB