Jump to content

c0d3r

Members
  • Content Count

    137
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by c0d3r

  1. c0d3r

    Modern StandBy

    Hi, All Our client application used a timer (TTimer) to send a ping to our application server every 60 seconds. It seems that the timer being killed by Windows when entering the Modern Standby mode, and never being re-activated when exit. The big problem is that Windows seems never send notification to all the applications when entering/exit from the modern standby mode. any way we could restart the timer? BTW, We did register power notification call back, like this: var LParameters: DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS; LParameters.ACallback := @DeviceNotifyCallbackRoutine; LParameters.AContext := nil; PowerRegisterSuspendResumeNotification(DEVICE_NOTIFY_CALLBACK, @LParameters, @FPowerNotify); However, we never got any notifications from Windows, no entry/no exit notifications at all. Any help would be appreciated. Thanks. Regards, William
  2. c0d3r

    Modern StandBy

    We don't see why windows got recreated and how to check HWND values before standby and after the wakeup, because we never know when its entering modern standby mode and when its waken up.
  3. c0d3r

    Modern StandBy

    Yes. we did: WM_KEYFIRST..WM_KEYLAST, WM_MOUSEFIRST..WM_MOUSELAST, seems working.
  4. c0d3r

    Modern StandBy

    HI, Remy As stated in my post #1, we are using PowerRegisterSuspendResumeNotification, call back routine, but we get ZERO notification when entry/exit from Modern Standby/Resume (regular Windows sleeping/wake up is working fine). Any difference between PowerRegisterSuspendResumeNotification and your RegisterSuspendResumeNotification. As the sample code we use to test, very simple, a TTimer and a Memo field on a vcl form, and OnTimer event (every 1 second): procedure TForm1.Timer1Timer(Sender: TObject); begin Memo1.Lines.Add(TimeToStr(Now)); end; NO output in the memo field after exit from Modern StandBy mode.
  5. c0d3r

    Modern StandBy

    Got the report back: TTimer was suspended and never resumed after exit from Modern standby mode (S0). It looks to me that all activities in the applications threads and windows message handlers were suspended, never being resumed.
  6. c0d3r

    Modern StandBy

    Good idea. will do it and report back.
  7. c0d3r

    Modern StandBy

    Is this the new requirement for this? The regular Windows sleeping/wake up don't need this GUID, which was working just fine.
  8. c0d3r

    Modern StandBy

    I thought so, BUT there is no new PING records in the server database after exit from the standby, so I think the timer is dead completely (I was at least waiting for 5+ minutes to check).
  9. HI, All I'm getting a strange issue, the following codes were trying logout users when Windows is going to sleep mode. For some reason, it works for some laptops, but it doesn't work for others: procedure WMPowerBroadCast(var Msg: TMessage); message WM_POWERBROADCAST; procedure TMainForm.WMPowerBroadCast(var Msg: TMessage); begin if (Msg.wParam = PBT_APMSUSPEND) or (Msg.wParam = PBT_APMSTANDBY) then begin try Signout; except end; Msg.Result := 1; end; end; Got the report from my client, the signout routine didn't get called when some laptops went to sleep (leave them opened and auto entered Sleep mode or Hitting Power button to force sleeping), but other laptops/PCs were working just fine.
  10. Something must be changed, was told it was working just fine on the same computer, and then stop working. They are using Windows 10.
  11. Works for some, won't work for others (not only 1), and they are on Windows 10
  12. The WM_POWER message is obsolete. It is provided only for compatibility with 16-bit Windows-based applications. Applications should use the WM_POWERBROADCAST message.
  13. HI, All Using Delphi 10.4.2, just wondering if TCompressionStream and TDecompressionStream in System.Zlib unit thread safe or not? Thanks.
  14. Thanks, I meant thread-personal instances, no shared streams.
  15. During last whole week, I tried to find what could be possible to cause my Windows service timeout while calling TidTCPServer.Active := False, I'm using Delphi 10.4.1, codes were working fine in Delphi 2007 with Indy 9+ until we migrated to 10.4.1: procedure TMyService.OnStop(...) begin TransportServer.Close ; <-- Error 1053 occurs. end; TransportServer is a type of TkbmMWTCPIPIndyServerTransport, the Close method internally was just calling TidTCPServer.Active := False; I can't figure it out because if i don't stop the service, it would serves the client requests/responses without any issue for weeks until at the point the users want to stop the service.
  16. @Remy LebeauAlthough we still can't figure it out after weeks (we don't deal with any TCP/IP socket codes), we found a workaround: kbmMW's Server component has a property called 'DisconnectAfterResponse'. By setting it to True, Most of our clinic customers don't have any TCP/IP socket close freezing issues, however few were still having the problem, they were the large and busiest clinics. We are planning to use Indy Github version to see if it helps, I'm just wondering whats difference between GitHub version and the one comes with Sydeny?
  17. c0d3r

    [firebird] Converting DB from one charset to other

    Here you go, this is how I did exactly what you wanted: https://github.com/zedalaye/fbclone
  18. Anyone has the same problem? Delphi 10.4.2, Press Ctrl+Shift+F on any word, Find in Files screen pops up, After a bit frozne, crashed the IDE. The workaround I can only found is that: It works fine after disabling Refactor menu.
  19. c0d3r

    Delphi 10.4.2 first impressions

    Another problem (Error Insight): ds is inherited from TDataset. The wave warning: 'Txxxxxxx does not contain a member named: 'FieldByName'/'Open'/'Free'.
  20. c0d3r

    Annoying IDE behavior changes in 10.4.2

    I can confirm all as well, went back to Classic, don't see why I should use LSP.
  21. c0d3r

    Object Inspector issue in 10.4.2??

    No issue on VMWare 16.1.0, Win10, 4K, 100%, Delphi 10.4.2
×