[Solved] Detecting new Network Connection setup ! lazarus / 34-Windows ---------------------------------------------------------------------- loaded · 2022-08-11 11:11 Hi All, Is there a message in the windows operating system that we can catch when a new network connection is established, to detect it? Or do we have to manually control it ourselves in the timer ? ---------------------------------------------------------------------- 440bx · 2022-08-11 11:34 Quote from: loaded on August 11, 2022, 01:11:54 pmIs there a message in the windows operating system that we can catch when a new network connection is established, to detect it? TTBOMK, there is no such message. Quote from: loaded on August 11, 2022, 01:11:54 pmOr do we have to manually control it ourselves in the timer ? Yes, I believe that is the only way. (unless the program itself is creating a new connection.) ---------------------------------------------------------------------- ccrause · 2022-08-11 12:19 As 440bx mentioned, there isn't a simple message. Next best is to look at Receiving Notification of Network Events.  NotifyAddrChange will notify you when something in the network setup has changed.  Then use GetIPAddrTable to figure out what changed.  Not simple, but at least you only have to check for a new IP address when a network change notification is received. ---------------------------------------------------------------------- loaded · 2022-08-11 13:01 Thank you very much for your answers 440bx and ccrause Good to know NotifyAddrChange. I think I can get out of this point and reach the point I want. Respects. When I went to point NotifyAddrChange I found an earlier post. For now this solution solved my problem. https://forum.lazarus.freepascal.org/index.php/topic,49350.msg357495.h tml#msg357495