Solved

Winsock2.h and Multicast...missing definitions

Posted on 2004-10-04
2
1,101 Views
Last Modified: 2013-12-03
I am currently trying to write some networking code in Visual C++ while trying to maintain cross platform compatibility.  My current issue is that I am trying to figure out how to setup a multicast connection and join and leave groups.  I already have some code which is just creating and binding a socket and then setting some options.  This stuff works fine, when I try to start playing with multi cast I start running into problems, such as winsock2.h does not define many of the multicast data structures and #defines, such as ip_mreq, and IP_ADD_MEMBERSHIP.  I found that these are defined in Ws2tcpip.h if I try to include this file I starti running into tons a of redfines.  What is the best approach to networking in windows while still maintaining maximal cross platform compatibility.  So I guess my first question is what do I need to include to get Multicast working, I would like to avoid all the WSA* calls.  What then is the best way to then starting join Multicast groups.

Thanks
0
Comment
Question by:mvoiers
2 Comments
 

Author Comment

by:mvoiers
ID: 12221866
sigh...I was doing out of order include I gues for the Ws2tcpip.h file, once I ensured that winsock2.h was include before Ws2tcpip I was then able to refrence the Multicast related structures.  So that still leaves me with my other question what steps do I take to join a group preferable without the WSA* functions.  Is there a good code snipet that demonstrates this?

0
 
LVL 8

Accepted Solution

by:
mxjijo earned 200 total points
ID: 12222610
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now