Windows 7 upgrade, UDP Broadcast issue
===

I am new to this environment as far as UDP protocols and sending/receiving data via networks.  I have read the other post regarding this kind of issue but I am not sure how to fix my problem:

I have just upgraded a PC to Windows 7 from XP. This upgrade was due to my application needs to run on Win7.  I have NOT changed the was our UDP stream is broadcasted.  With the upgrade I can no longer run the older version of my application becasue the UDP stream doesn't seam to get to my application.

I have turned off all firewalls and am running everything as admin. 

This is how my setup is:

Code is running on ip: 192.168.2.1
UDP is sent from 192.168.2.1 to 192.168.2.87 and then broadcasted to 192.168.2.255

I used to be able to see this UDP stream with my old application on a seperate computer: 192.168.2.12

If I change my UDP stream to go directly to 192.168.2.12 ip, then my application works, but then the UDP is not broadcasted anymore. I need the UDP to be able to be read by more than one computer. 

Here is my wireshark out put for the UDP Stream:

    Source: 192.168.2.87 
    Destination: 192.168.2.255 
    Protocol: UDP Info: 
    Sorce Port: 6601 Destination Port: 6601

I have tried hard coding my c-code to listen to any possibility I can think of, aka the sender addr function:

    senderAddr.sin_addr.s_addr = htonl(INADDR_ANY);

To something like: 

     senderAddr.sin_addr.s_addr = inet_addr("192.168.2.212")


This is the code to init the I/O buffer: 


    // UDP Receiver Declarations -
    SOCKET SockIn = INVALID_SOCKET;
    SOCKADDR_IN senderAddr;
    int senderSize = sizeof(senderAddr);
    u_short PortIn = 6601;
    
    int timeout = 1;
    
    //===================<Callbacks::Callbacks>==================
    //
    // Summary: Constructor
    //
    //=============================================================================
    Callbacks::Callbacks(RTUserIntegrationI &a_rIntegration)
    : m_rIntegration(a_rIntegration)
    , m_pUDPInput(NULL)
    
    {
    }
    
    //=====================<Callbacks::~Callbacks>===============
    //
    // Summary: Destructor
    //
    //=============================================================================
    Callbacks::~Callbacks()
    {
    }
    
    //=====================<Callbacks::InitIOBuffers>====================
    //
    // Summary: Init function for the IO buffer
    //
    //=============================================================================
    void Callbacks::vInitIOBuffers()
    {
    	BOOL bOptVal = TRUE;
            int bOptLen = sizeof(BOOL);
    
    	WSADATA WSAData;
    
        UInt Size = 0;
      // UDP Declarations -
    
    
       // Initialize the member pointers to buffers
    
        bufferin = m_rIntegration.pGetIOBuffer(Input_Buffer);
    	if (bufferin != NULL)
    	m_pUDPInput = static_cast<InputData*>(bufferin->pGetDataAddress(Size));
    
      // UDP Receive -
       if (WSAStartup(MAKEWORD(2, 2), &WSAData) != 0)
       {
           printf("\nCould not open WSA connection");
           WSACleanup();
       }
    
       SockIn = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
       if (SockIn == INVALID_SOCKET)
       {
           printf("\nCould not create socket.");
           closesocket(SockIn);
           WSACleanup();
       }
    
       senderAddr.sin_family = AF_INET;
       senderAddr.sin_port = htons(PortIn);
       senderAddr.sin_addr.s_addr = htonl(INADDR_ANY);
    
          if (setsockopt(SockIn, SOL_SOCKET, SO_REUSEADDR, (char*)&bOptVal, bOptLen) != INVALID_SOCKET)
       {
    	   printf("\nSet SO_REUSEADDR: ON.");
       }
    
       if (bind(SockIn, (struct sockaddr *) &senderAddr, senderSize) == -1)
       {
           printf("\nCould not bind socket.");
           closesocket(SockIn);
           WSACleanup();
       }
    
       setsockopt(SockIn, SOL_SOCKET, SO_RCVTIMEO, (char*) &timeout, sizeof(timeout));
    
    
    
    }



I have the receive port number hard coded to 6601.

The code above works fine and the computer sees and reads the broadcasted UDP in Windows XP but ceases to work in Windows 7. 

Any suggestions would be greatly appreciated.
