A: 

You may want to check/change your routing table. There will be a route for multicast (224.0.0.0, subnet 240.0.0.0) traffic in there with its appropriate metric:

C:\Users\Cetra>netstat -rn

*****

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0   192.168.80.254    192.168.80.99     20
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
     192.168.80.0    255.255.255.0         On-link     192.168.80.99    276
    192.168.80.99  255.255.255.255         On-link     192.168.80.99    276
   192.168.80.255  255.255.255.255         On-link     192.168.80.99    276

        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306 
        224.0.0.0        240.0.0.0         On-link     192.168.80.99    276

  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     192.168.80.99    276

******
Cetra
Thanks for your reply. Adding/changing a multicast entry to the routing table is a workarkound that works. But most probably I won't be able to change the routing table of customer PCs.
Basti
I don't regard it as a workaround, it's just how networking works. Would your customer's PCs be multihomed also?
Cetra
As the application is a product, I can't exclude that.I already thought about changing the routing table by a windows API function... But I'm unsure if that couldn't result to some side effects on the customer PC. So I dropped the thought.
Basti
Well it would not harbour much trust if you changed it automatically. If you had something in your settings dialogue that listed all the interfaces and had a disclaimer when they changed it, i.e, "this will change the routes for multicast traffic, are you sure? y/n".
Cetra
Yes, that would be a better approach :-)However, I still can hardly believe that there is no way to force a socket to send the Multicast IGMP Join message using a specific NIC. That doesn't make any sense to me.
Basti
A: 

The problem was a simple typo. Instead of using the structure struct ip_mreq_source, the structure struct ip_mreq must be used if using the option IP_MULTICAST_IF. (The other structure is needed for the IP_ADD_SOURCE_MEMBERSHIP option)

Using the wrong structure had most probably the result that the setsockeopt function found a zero where the NIC IP address was expected. Zero is also the value of the INADDR_ANY constant, which choose the default NIC of the system. :-)

Basti