?
Solved

how to make a broadcast ping in VC++.net??

Posted on 2003-10-26
6
Medium Priority
?
291 Views
Last Modified: 2013-11-20
I am using winsock2.h for dealing with network programming. But I dont know how to make broadcast ping in it ??
0
Comment
Question by:elsayed_mazen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:migel
ID: 9625951
Hi!
What do you mean under "broadcast ping"?
Do you try find all "near" hosts?
0
 
LVL 12

Expert Comment

by:migel
ID: 9625952
Hi!
What do you mean under "broadcast ping"?
Do you trying find all "near" hosts?
0
 

Author Comment

by:elsayed_mazen
ID: 9631299
yes I mean that, I use the function setsockopt() and use the parameter SO_BROADCAST to make my socket dealing with the broadcasting, but there is a runtime error appeares when excute the program.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:migel
ID: 9632130
code please?
and what exactly error you get?
May be you use wrong type for SO_... value?
for SO_BROADCAST you have to use BOOL (reallly DWORD) value.
0
 

Author Comment

by:elsayed_mazen
ID: 10065260
OK, forget that quistion, How can I know the hosts connected to the LAN by my program??
0
 
LVL 5

Accepted Solution

by:
Nass89 earned 250 total points
ID: 10068714
Hi,
Try

Bool IsNetworkAlive(
  LPDWORD lpdwFlags     // Specifies the type of network connection
);

Good Luck!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 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