Jump to content

DelphiUdIT

Members
  • Content Count

    736
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by DelphiUdIT

  1. Uhmmm for me it's not working, but maybe I'm missing something... I'm almost certain that the "as" and "is" don't work if the GUIs are identical...
  2. I agree with you, I just wanted to point out some sources on where to possibly look for further useful information on the topic. I've already seen double GUIDs in interfaces in COM environments, and they worked correctly (or at least I never detected problems), but I never looked into them further.
  3. You must use GUIDs when there is a need to use RTTI "as" and "is". Like you told, each interface should have a unique GUID, but I have already see that. Start from here: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Object_Interfaces_(Delphi) (may be the link is wrong ... wiki is down at the time of writing) P.S.: You can read also these books (with examples) - Hodges Nick - Coding in Delphi (year 2013) - Hodges Nick - More Coding in Delphi (year 2015) I don't know if there are something that can help you ...
  4. DelphiUdIT

    Getit out of service

    Yes since Friday evening.
  5. If the system is overloaded all activities and processes including threads, events, etc ... will inevitably be delayed. To mitigate this you can just "play" with the thread priority. Using sleep in a thread at a higher priority than normal is usually a satisfactory solution. However, if the timer needs to be triggered (i.e. it is not always active), then you should use sleep in combination with a WaitFor. As @Dalija Prasnikar says, it is not possible to provide you with further solutions if you do not present code or delve deeper into the topic.
  6. DelphiUdIT

    Run in new desktop

    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.
  7. DelphiUdIT

    How can I make TTimer run in the main tread ?

    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
  8. DelphiUdIT

    How can I make TTimer run in the main tread ?

    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);
  9. DelphiUdIT

    Run in new desktop

    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 ...
  10. DelphiUdIT

    How can I make TTimer run in the main tread ?

    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.
  11. DelphiUdIT

    Run in new desktop

    If you think the functions are "failing" try testing their return parameter and detect the "getlasterror" to see if there are more precise indications.
  12. 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.
  13. 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;
  14. DelphiUdIT

    Debugger gives wrong value for long double

    Have you tried the math package RudysBigNumbers https://github.com/TurboPack/RudysBigNumbers ? It's in Getit too.
  15. No, you can use Lazarus / FPC but you must rewrite your application. Before that you must be sure that they support last Android SDK.
  16. 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 ...
  17. 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.
  18. 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/
  19. "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.
  20. DelphiUdIT

    Access multiple Outlook calendars

    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.
  21. DelphiUdIT

    Handing over the baton to Thomas and Lars

    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.
  22. 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
  23. DelphiUdIT

    Gnostice & Delphi 11 & fastreport

    May be FastReport is not available for Community Edition.
  24. 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
×