VladislavShcherba
VladislavShcherba

Reputation: 470

Is it possible to listen for "ipconfig" changes on Windows?

I need to execute some code when IP address associated with "Connection-specific DNS Suffix" is changed. I thought may be it is not so good to check every N seconds/minutes for changes manually and there is something like "listener" that will execute my code as soon as changes was made. Do you know something about it? Or is it impossible and I need just check sometimes for changes? I'm considering Java or C++ (Java is much more suitable for me). Thanks :)

Upvotes: 0

Views: 250

Answers (1)

UKMonkey
UKMonkey

Reputation: 6993

https://msdn.microsoft.com/en-us/library/windows/desktop/aa366334(v=vs.85).aspx Highlights 2 functions you can use in C++

  1. NotifyAddrChange
  2. NotifyRouteChange

Not knowing exactly what change you're looking for, I leave it to you to read up about them.

Upvotes: 1

Related Questions