Solved

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

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

 
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

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!

Question has a verified solution.

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

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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