Multicasting UDP

Hello,

I am writing socket level code to multicast UDP datagrams.  My code
appears to work fine on Win2K but I get socket errors on WinNT.  The
offending code follows:

MulticastRequest.imr_multiaddr.s_addr := inet_addr(PChar(FAddress));
MulticastRequest.imr_interface.s_addr := htonl(INADDR_ANY);
if (setsockopt(FSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
@MulticastRequest, SizeOf(ip_mreq)) = SOCKET_ERROR) then
  SocketError(WSAGetLastError);

I find under Win2K this is fine and my socket joins a multicast group.
 However under WinNT I get a socket error number 10022 (WSAEINVAL) for
invalid argument.

Can anyone shed light on this?

Thanks,
Richard