Solved

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

Posted on 2003-10-26
6
289 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
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!

 
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 125 total points
ID: 10068714
Hi,
Try

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

Good Luck!
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
maxBlock challenge 30 146
Prevent this page from creating additional dialogs. 3 725
string initialization in java 11 117
scoreUp challenge 14 70
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 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