

DelphiUdIT
Members-
Content Count
839 -
Joined
-
Last visited
-
Days Won
18
Everything posted by DelphiUdIT
-
Uhmm ... you used a wrong words .... for me is "many times", not "few times" , 4 times I went in the lock screen. Like you wrote, something about Windows 11 is wrong. I cannot help 'cause I have not experience in this case. I never used CreateDesktop or similar api. Good luck and let us knows if you'll resolve the question.
-
To be more exact as possible you can use MMSystem: timeBeginPeriod(1); timeEndPeriod(1); These affect the timer resolution in Windows ... in this example the resolution is set to milliseconds between timeBeginPeriod and timeEndPeriod. You can find more information on: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod. You can set (timebegin) at the start of application and reset (timeend) at the end. P.S.: normally this is the accuracy ... thanks to Mark: https://learn.microsoft.com/it-it/sysinternals/downloads/clockres
-
I use PlaySound in async way (and with more then 10 seconds) in all my applications without any issue. I use it with RESOURCE identifier, but with old app I used also with media file. PlaySound('Alarm_Sound', HINSTANCE, SND_RESOURCE OR SND_ASYNC);
-
Terrible 😱 ... in Windows 11 23H2 that produce a black screen with application, but when you close the application there is no way (or better, I don't know how) to come back to previous Desktop ... close some process, launch new explorer ... all shortcuts ... only shutdown and restart Windows (from Task Manager -> "New operation") ... also everything I launch is not visible, may be is attached to old Desktop ... This is a good and simple hacking app ...
-
Like most events, the OnTimer event executes on the main thread. It might be what you do in the OnTimer procedure that is "asynchronous" and the procedure "OnTimer" exits before the async operations complete.
-
If you think the functions are "failing" try testing their return parameter and detect the "getlasterror" to see if there are more precise indications.
-
Network scan in Delphi (Windows), get MAC addresses
DelphiUdIT replied to ErikT's topic in Network, Cloud and Web
I'm not aware of those. I have some applications that call PING and TCP alternate, thousands of times a day to various devices (over the Internet), and I have no such error reports. And they are applications that run for years without ever being turned off. They use TIdICMP (for ping) (WIN32 version) and are multithread applications but all the PINGs are running only from one thread. -
Network scan in Delphi (Windows), get MAC addresses
DelphiUdIT replied to ErikT's topic in Network, Cloud and Web
May be you can use the ARP protocol ... finding MAC Add is its function: Uses WinApi.Winsock2, WinApi.IpHlpApi, WinApi.IpExport; procedure TForm1.Button1Click(Sender: TObject); var DestIP, SrcIP: IPAddr; AddrLen: ULong; MacAddr: array[0..5] of byte; s: AnsiString; i: integer; begin SrcIp := 0; s := '192.168.2.10'; //ROTATE IP DestIP := inet_addr(PAnsiChar(s)); AddrLen := SizeOf(MacAddr); SendARP(DestIP, SrcIP, @MacAddr[0], AddrLen); s := ' MacAddress : '; if AddrLen > 0 then for i := 0 to AddrLen-1 do begin s := s + IntToHex(MacAddr[i], 2) + '-'; end; SetLength(s, length(s)-1); ShowMessage(s); end; -
Have you tried the math package RudysBigNumbers https://github.com/TurboPack/RudysBigNumbers ? It's in Getit too.
-
Advice needed: Maintaining a Delphi application on the Google Play Store
DelphiUdIT replied to Yaron's topic in Cross-platform
No, you can use Lazarus / FPC but you must rewrite your application. Before that you must be sure that they support last Android SDK. -
Advice needed: Maintaining a Delphi application on the Google Play Store
DelphiUdIT replied to Yaron's topic in Cross-platform
It's useless. Lazarus approach to Android is totally different from FMX. You must rewrite all your code. And I don't know if last Android api level 33 are supported ... -
İs possible same pointer size for Win32/Win64?
DelphiUdIT replied to kosovali's topic in Algorithms, Data Structures and Class Design
There is not only a problem of the length of the "pointers" but also of the arrangement of the data within the record. The compiler "fills" the record structure with zero bytes to align the data to the defined alignment (which can be the standard one or one defined in that section of code). Therefore, the transmission of that data (whatever it is) is still at risk even if it were performed within programs made with Delphi. A change of alignment (even the standard one) for example between different platforms or different compiler releases could lead to different results. -
I haven't seen any blogs or public news about Rad 12 Beta (Yukon) yet (except directly from Embarcadero). This is the link where Dave reports some important news: https://delphiworlds.com/2023/09/yukon-is-coming/
-
Private key in User Store, Could not export private key - The parameter is incorrect (#-2146893785)
DelphiUdIT replied to mv2023's topic in ICS - Internet Component Suite
"MS_SMART_CARD_KEY_STORAGE_PROVIDER" is useless with smartcard. All the smartcards I have used are not read through that provider, but only through their own provider, which can be listed via CNG (CryptoApi Next Generation). So far I've only used Common Name (CN) access without using the password key for my purposes, and I was planning to move forward to specifically use a smartcard with Indy (but obviously it could work for ICS too). But time is running out and I don't know when I will be able to continue. -
It has little to do with the topic, but with the entry into force of the DMA (European Digital Markets Act) in Europe the automatic login of applications linked to a particular account will most likely be changed. It seems that when you start the application you will be asked for the account to use for that application, effectively eliminating the possibility of automatic login. So if a "CreateOleObject" is executed, further operator action may be required. All this is a hypothesis for now, we are waiting for what and how the service provider companies (such as Microsoft for e-mail for example) will implement everything. https://commission.europa.eu/strategy-and-policy/priorities-2019-2024/europe-fit-digital-age/digital-markets-act-ensuring-fair-and-open-digital-markets_en This is relevant in my sector (industries), because all activities should be automatic... let's hope that the changes do not imply a distortion of the authentication logic.
-
Handing over the baton to Thomas and Lars
DelphiUdIT replied to Daniel's topic in Community Management
Thank you, Daniel, for your commitment to the forum. Delphi-PRAXiS is truly a place where you can find professional advice and members are always available to resolve other people's doubts and problems. Happy continuation in your career. -
Help connecting D11.3 Community Edition FireMonkey Android app to Azure SQL database
DelphiUdIT replied to GrumpyNoMore's topic in Databases
I used Zeos with Delphi 11 only for test purpose (vs. Lazarus). But I didn't find any issue. I don't remember what version was (7.2 or 8). Reading on Zeos forum seems that is compatible with Delphi 11. Try to download from: https://github.com/frones/ZeosLib -
May be FastReport is not available for Community Edition.
-
Where to put an app in Windows startup and shutdown and sleep mode?
DelphiUdIT replied to JohnLM's topic in General Help
You can put your program in AUTOSTART folder, and every time the program start filter the Windows events log (like others told). Sometimes (for example every day changes) filter again it. Take care that if you want to start the program for every accounts you should write some records in the Windows registry. Alternatives is that you capture the message events (like QueryEndSession and similar) to capture in realtime whats happens You must take care of user multisessions and also terminal server (or RDS). Bye -
WTSQuerySessionInformation doesn't work in x64 application
DelphiUdIT replied to gioma's topic in Windows API
-
WTSQuerySessionInformation doesn't work in x64 application
DelphiUdIT replied to gioma's topic in Windows API
This appears to be an issue related to "overwriting" of memory areas. Another tip: try disabling the "support high-entropy 64 bit address ..." item in the project options (Delphi compiler / Linking). P.S.: Do not attempt to redefine the methods, they are already defined in the indicated unit that comes with Delphi. -
WTSQuerySessionInformation doesn't work in x64 application
DelphiUdIT replied to gioma's topic in Windows API
None about this, but I want suggest to use the WinApi.Wtsapi32 (It is the wrapper distributed with Delphi 12). It's a little bit different from yours. -
It's not so simple, if you look only at one piece of "system" yes it is very very simple, but not really if you look at global system. I make systems where different manufacturers participate and obviously each of them has no problems with themselves. It's when everyone has to talk to each other (I mean the systems) that problems arise. One makes versions 1, 2, 3 over time and each of these is not compatible with the rest of the world in their respective versions. It's like if you do Windows 11.1, 11.2, 11.3 and ALL third party applications have to be totally remade for each version (and not for improvements). Operating system, email, text editor, etc... all software versions are different. And in the industrial sector this causes quite serious problems: every time something is changed the entire system must be validated again with considerable costs and resources. Try to think if a system made a "braking control" pass off as good when in fact it isn't....
-
However, it may be that the focus of the foreground window is not yet active when the program generates the key sequence. The fact that it works during debugging and that in normal runtime it doesn't, makes me think so. Try putting a sleep(1000) after the SetForeground. Then maybe decrease the sleep...
-
The same for me. The servers are in vacation