-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Usually there's a list of all running threads in process (anon threads are simple but lead to hell) and stopping them involves accessing every instance anyway so there's no big difference between local or global stop events, just the stopper code: SetEvent(GlobalStopEvent) for thr in Threads do thr.WaitFor vs for thr in Threads do SetEvent(thr.StopEvent) for thr in Threads do thr.WaitFor For the best flexibility the stop event could be optionally passed to a thread or created locally if not specified.
-
How to gracefully get rid of the use of dictionaries?
Fr0sT.Brutal replied to Shrinavat's topic in General Help
TDirection = (dirN, dirS, dirW, dirE) TDirectionArr = array[TDirection] of ShortInt -
[firebird] Converting DB from one charset to other
Fr0sT.Brutal replied to Jacek Laskowski's topic in Databases
IB/FB has DataPump AFAIK -
IBExpert, as its name obviously means, deals with IB and FB. OP has Postgres. bug
-
Adressing IP with System.Net.HttpClient
Fr0sT.Brutal replied to weabow's topic in Network, Cloud and Web
Disable server verification. IDK how to do it with THTTPClient but you have the subject to search for. With Windows secure sockets I done this https://github.com/Fr0sT-Brutal/Delphi_SChannelTLS/ // starting TLS handshake if sfNoServerVerify in SessionData.Flags then dwSSPIFlags := dwSSPIFlags or ISC_REQ_MANUAL_CRED_VALIDATION; ... // before starting TLS if FAddrIsIP then begin SChannelLog(loSslInfo, Format(S_Msg_AddrIsIP, [Addr])); Include(FSessionData.Flags, sfNoServerVerify); end; ... // after successful handshake // Don't pass host addr if it's IP otherwise verification would fail if FAddrIsIP then CheckServerCert(FhContext, '') else CheckServerCert(FhContext, Addr); In cURL this option is called "insecure" -k, --insecure (TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store. See this online resource for further details: https://curl.haxx.se/docs/sslcerts.html See also --proxy-insecure and --cacert. -
Fixes to allow HTTP & socks proxy servers to have non-IP address
Fr0sT.Brutal posted a topic in ICS - Internet Component Suite
Fix incorrect logic that raises exceptions if HTTP tunnel / socks address is non-IP 0001-TCustomHttpTunnelWSocket.Connect-allow-HTTP-tunnel-t.patch 0002-TCustomSocksWSocket.Connect-allow-socks-to-have-non-.patch Patches are applied over v8.66 pt5 -
Retrieve Delphi version used from within an App?
Fr0sT.Brutal replied to Ian Branch's topic in General Help
Nice to know, thanks! I support D7+ only though 🙂 -
@pyscripter I mostly addressed David's answer on that SO topic where he calls TBaseForm.UpdateDoubleBuffered. AFAIU the issue with crashes only affects apps using styles or FMX which is not my case for now so I'm not dealing with all this registering and messaging
-
Hmm, how about setting ParentDoubleBuffered to True for all components and changing only form's DoubleBuffered property? I did so for now and see no issues. Probably I'm missing something? I also did it the simplest way setting DoubleBuffered on startup only - I've no machines accessed both locally and remotely
-
Micro optimization: use Pos before StringReplace
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Currently it's much better than it was -
Retrieve Delphi version used from within an App?
Fr0sT.Brutal replied to Ian Branch's topic in General Help
// Compiler version constants for checking with CompilerVersion constant const RAD_Sydney = 34; RAD_10_4 = 34; RAD_Rio = 33; RAD_10_3 = 33; RAD_Tokyo = 32; RAD_10_2 = 32; RAD_Berlin = 31; RAD_10_1 = 31; RAD_Seattle = 30; RAD_10 = 30; RAD_XE8 = 29; RAD_XE7 = 28; RAD_XE6 = 27; RAD_XE5 = 26; RAD_XE4 = 25; RAD_XE3 = 24; RAD_XE2 = 23; RAD_XE = 22; RAD_2010 = 21; RAD_2009 = 20; RAD_2007 = 19; RAD_2006 = 18; RAD_2005 = 17; Delphi_8 = 16; Delphi_7 = 15; -
Good subject BTW - I learned GetSystemMetrics(SM_REMOTESESSION) and redesigned DoubleBuffered usage in my apps that are running on remote PC's
-
Delphi service in a domain controlled environment
Fr0sT.Brutal replied to thomh's topic in Network, Cloud and Web
Why do you think so? -
Global variable : why the compiler don't complain about this ?
Fr0sT.Brutal replied to mderie's topic in General Help
OTOH I wouldn't be happy with something like Microsoft.Interfaces.Winapi.IOUtils.TPath.PathDelimiter -
F.ex., my 10.3 is veeery lazy on scrolling via RDP.
-
Why is this code not thread safe (Delphi 7)
Fr0sT.Brutal replied to Yaron's topic in Algorithms, Data Structures and Class Design
Are you sure that's RTL that does these things? In which method? -
My preference: - Place on a form only visual and related components (dialogs, etc). Place Data access components in Data module. Other ones are created dynamically - Use .Create(Form) when component's lifecycle is the same as owner form's. This way the form cares of destroying it - Use .Create(nil) and destroy manually otherwise
-
Install flag to say it's for ALL USERS?
Fr0sT.Brutal replied to David Schwartz's topic in Delphi IDE and APIs
Security restrictions are PITA! So you can just nag those security guys to do whatever they want but provide you, the software writer, with properly set instruments. Alternatively, try to just copy files from UserData and registry entries from Admin's HKCU to your account -
Removing Hints & Warnings — Specifically, "H2443 Inline function"?
Fr0sT.Brutal replied to Steve Maughan's topic in Delphi IDE and APIs
I've never seen FileCreate/FileClose inlined; DeleteFile is inlined for Posix and yes, RenameFile is still inlined for all platforms (checking in XE2 and 10.3). Odd decision really. The worse thing with inlines is that they can't use internal constants 😞 -
Well, I suppose if you need both English&coding tutor, you should expect x2 price 😄
-
It's weird to seek for a mentor on international forum with such lang skills. Why don't try at sql.ru?
-
*facepalm* Winsock is included into RTL and you can create client-server apps with it. What a stupid policy
-
Micro optimization: Split strings
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@Attila Kovacs yep that's why I came up to AllowEmpty option. Nevertheless I agree that behavior should be consistent between implementations in other languages (this issue is long-lasting TODO entry, probably I'll move it somewhat upper)