You should take a look at the
SendARP function that is provided by Windows (both NT and CE). You essentially send an ARP packet to the IP address of the router and it will reply with it's MAC address.
Please note that
SendARP is available in the
jwaiphlpapi unit on
win32 and
win64 and
would normally be available in the
iphlpapi unit on
wince, but the unit is essentially stubbed out... However you should be able to copy the declaration from the
jwaiphlapi unit.