473,462 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Host to IP

I'm trying to make a windows form application to ping, and convert host to
IP and IP to host. But it is little difficult to find a code that works,
will it be a lot of programming, or can this be done with a short and easy
code?

Thanks.
Johansen
Apr 2 '07 #1
2 1180
Hi,

What is difficult, the code for ping or the code to do the host->ip and
ip->host?

The following will help for the later
System.Net.Dns.GetHostAddresses
System.Net.Dns.GetHostEntry

As for the ping, take a look at the following class
System.Net.NetworkInformation.Ping

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor
"Øyvind" <in***@epost.nowrote in message
news:g5********************@telenor.com...
I'm trying to make a windows form application to ping, and convert host to
IP and IP to host. But it is little difficult to find a code that works,
will it be a lot of programming, or can this be done with a short and easy
code?

Thanks.
Johansen
Apr 2 '07 #2

"Chris Taylor" <ch*************@hotmail.comskrev i melding
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

What is difficult, the code for ping or the code to do the host->ip and
ip->host?

Yes, I have a TextBox1 where I put in a hostname, I click a button and the
IP will show in TextBox2. Or, if I put a IP adress in TextBox1, and push
another button, I get the hostname in TextBox2. That is the plan anyway :-)

Johansen
Apr 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jason mazzotta | last post by:
Hi, I'm rather new to both MySQL and PHP. I've been trying to use PHP to write to a MySQL database. I call mysql_pconnect to get a database connection, but then when I call mysql_db_select, I get...
9
by: Jeff | last post by:
Is there a way to echo back a case sensitive $HTTP_HOST in PHP? For example if I type HostName.domain.com in my browser I want to return it exactly as it appears in the location part of the browser...
1
by: Dave | last post by:
I know that Remoting requires a host application on the server. Is it possible to use COM+ as the host? If so, where can a good example be found?
6
by: Tim | last post by:
I am in the process of moving a site from one hosting company to another. This site is fairly large, with hundreds of asp files, each with multiple "include" statements. The new host has a...
3
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
2
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. ...
6
by: Brian Henry | last post by:
is there a way to get the host name of someone? like mine is 68-23-123-123-pitt-pa.adelphia.net? Request.UserHostName doesn't seem to return the host name like it states in the documentation,...
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
7
by: misha | last post by:
Hello. I was wandering if someone could explain to me (or point to some manual) the process of mapping the addresses of host variables by DB2. Especially I would like to know when DB2 decides to...
5
by: Krice | last post by:
There is a component class inside the host class: class Host { Component *c; .... In some cases Component needs to call the host and I guess the only way is that you pass the host for it:
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.