Hi Khaled, thanks for your reply.

I'm using Windows XP Professional SP2 64-bit and mIRC v7.32. Maybe Windows 7/8 handles a "127.0.0.1" fourth parameter to CStaticPortMappingCollection::Add() more gracefully, substituting your 192.168.x.x IP address, but Windows XP does not — instead, it substitutes the local Computer Name (which my router doesn't even know about) — at least, that's what my installation of Windows XP has been doing. I can send you a Wireshark log if you'd like.

And no, I tried lots of variations of options in in Options/Connect/Options/Ports, including binding to the adapter, and that made no difference.

I made a tiny DLL that intercepts mIRC's call to CStaticPortMappingCollection::Add() and substitutes my interface IP address in place of "127.0.0.1", and this fixes the problem (makes mIRC's UPnP work perfectly).


Come to think of this, this might actually be a bug in Windows XP. It makes no sense for it to substitute the Computer Name. But that doesn't mean mIRC shouldn't work around the bug ;-)   (if it is a bug)