11-02-2016, 03:40 PM
How I imagine all this:
void run()
{
Calls NotifyIpInterfaceChange (WinAPI) and passes address of callback function InterfaceChangeCallback.
}
void NotifyIpInterfaceChange(...) //this func is in iphlpapi.dll
{
MIB_IPINTERFACE_ROW row; //creates the variable and fills some its members
Calls your callback function and passes row address to it.
}
void InterfaceChangeCallback( MIB_IPINTERFACE_ROW* row)
{
Calls interfaceChanged and passes row to it.
}
void interfaceChanged(MIB_IPINTERFACE_ROW* row)
{
Calls GetIpInterfaceEntry (WinAPI) and passes row.
}
void GetIpInterfaceEntry(MIB_IPINTERFACE_ROW* row) //this func is in iphlpapi.dll
{
Fills row members.
}
void run()
{
Calls NotifyIpInterfaceChange (WinAPI) and passes address of callback function InterfaceChangeCallback.
}
void NotifyIpInterfaceChange(...) //this func is in iphlpapi.dll
{
MIB_IPINTERFACE_ROW row; //creates the variable and fills some its members
Calls your callback function and passes row address to it.
}
void InterfaceChangeCallback( MIB_IPINTERFACE_ROW* row)
{
Calls interfaceChanged and passes row to it.
}
void interfaceChanged(MIB_IPINTERFACE_ROW* row)
{
Calls GetIpInterfaceEntry (WinAPI) and passes row.
}
void GetIpInterfaceEntry(MIB_IPINTERFACE_ROW* row) //this func is in iphlpapi.dll
{
Fills row members.
}