Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IP to long IP

Posted on 1997-06-22
4
Medium Priority
?
234 Views
Last Modified: 2010-05-18
I would like to have the source code, in delphi, to convert an IP address to a long IP address.
0
Comment
Question by:fmichaud061597
  • 2
4 Comments
 
LVL 2

Expert Comment

by:icampbe1
ID: 1337469
Be clear.  Do you mean IP like TCP/IP?? Or do you mean IP like Integer Pointer??   What is a long TCP/IP address anyway??  They are all four numeric groupings aren't they?  like:  012.345.678.901  

I would like to help if you would clarify a bit.

Ian C.
0
 

Author Comment

by:fmichaud061597
ID: 1337470
The long IP is used in the IRC protocole to invoke, for example, a DCC Chat connexion. The algorythm takes the normal IP like: 127.0.0.1 and converts it to something like: 456373647
0
 
LVL 3

Accepted Solution

by:
sperling earned 150 total points
ID: 1337471
Can't you just use TInAddr in Winsock.pas ?

  TInAddr = packed record
    case integer of
      0: (S_un_b: SunB);
      1: (S_un_w: SunW);
      2: (S_addr: u_long);
  end;

Set S_un_b and read S_addr.


Regards,

Erik.

0
 

Author Comment

by:fmichaud061597
ID: 1337472
I got the source code for that, so if you want it send me a message!
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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

824 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