iphlpapi.c:3098: this is the last test seen before the exception 20dc:iphlpapi:0.328 unhandled exception c0000005 at 7406EADC
Apparently SendARP(0, 0, NULL, NULL) does not return ERROR_NOT_SUPPORTED on native. It may have done so on older Windows, but it doesn't anymore. Let's just remove those segfaulting tests, testing error handlers isn't very useful.
(PULONG) &MacAddr
Should just be MacAddr.
SendARP( inet_addr("127.0.0.1"), 0, ...)
I tried it.
Windows reports success and a zero-byte MAC address. We may or may not want to mimic that, but we definitely don't want to use that as the primary test.
I suspect this is because localhost doesn't have a mac address - it doesn't go through any networking hardware, it just stays inside the kernel. Sorry if I'm the one who told you to use localhost, I'm not particularly familiar with this stuff.
You can, however, use 255.255.255.255 as the target. That requests the MAC address of everything on the network, and returns the first one to respond (usually the local one).
I didn't check the implementation (yet), only the tests. Let's get the tests passing on Windows first, so we know what exact behavior our SendARP should implement.