I am using GetAdaptersInfo( pAdapterInfo,pOutBufLen); to get the adapters info of the machine. I am using GetBestInterface() to get the index of my connection with the far end. So then I am matching this index with pAdapterInfo->index to find out which interface i am using. Then if I disable (disconnect) the interface and connect it back again it wont be able match. I guess pAdapterInfo is changed in the meantime. If I call GetAdaptersInfo() again, then i will be able to match. Is that the expected behaviour?
On what occasions should i call GetAdaptersInfo()? Say if i disconnect an interface that i dont use for my connection with the far end, will pAdapterInfo again change? Will I not be able to match the index?
Do I have to call GetAdaptersInfo() whenever an interface is disabled or enabled?
Do I have to call GetAdaptersInfo() whenever an interface is disconnected or connected (from network without disabling or enabling)?
In other words on what occasion pAdapterInfo will change?
Thanks very much for any help!!
DB
Ps, If anyone thinks this thread should belong to another topic, pls let me know, i'll move it accordingly.