Network Event Notification

The IPHelper library can also notify you when something changes in regard to your device's TCP/IP configuration for either IP address or the IP route table. However, be aware that these notifications do not tell you exactly what has changed, only that something has. To find out more details about the changes, you'll need to reexamine the tables by calling either GetIpAddrTable() or GetIpForwardTable().

To be notified of any changes that occur in the IP address table, use the following:

DWORD NotifyAddrChange(HANDLE *Handle, LPOVERLAPPED overlapped);

The first parameter, Handle, is a pointer to a handle that you want to be signaled when something has changed in the address table. If you set this to NULL, the function will block until a change has occurred. The second parameter, overlapped, is not used on Pocket PC.

To be notified of any changes to the IP routing table, you can use the NotifyRouteChange() function:


The parameters for NotifyRouteChange() are the same as for NotifyAddrChange().