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:

 DWORD NotifyRouteChange(HANDLE *Handle, LPOVERLAPPED   overlapped); 

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



Pocket PC Network Programming
Pocket PC Network Programming
ISBN: 0321133528
EAN: 2147483647
Year: 2005
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net