[Delphi]Using Winsock In Delphi?!-VBForums
Results 1 to 6 of 6

Thread: [Delphi]Using Winsock In Delphi?!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    [Delphi]Using Winsock In Delphi?!

    Hello every one
    In Visual Basic i use to work with Winsock and i made some cool programs using this cooool tool
    But now i'm in Delphi and i quit VB for ever..And i would like to know how to use Winsock in Delphi (ClientSocket and ServerSocket VCL of corse and not the OCX tool).
    So does any body can help me

    Note: Let's make something clear..I'm not learning Winsock to make Trojans
    Last edited by NoteMe; Jul 29th, 2005 at 09:57 AM.

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Other side of town from si_the_geek
    Posts
    7,171

    Re: Using Winsock In Delphi?!

    I moved your thread from the Codebank. The codebank is for posting code samples, not questions. The appropriate forum for Delphi questions is the "Other Programming Languages", where I have moved it


    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    Re: Using Winsock In Delphi?!

    Any Body!!!!!!!!!!!!!!!!

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Camden, London Mode: PPI
    Posts
    4,904

    Re: Using Winsock In Delphi?!

    Sorry for the late response. I swear I replied to this yesterday . Anyway, follow the instructions below to add the winsock active X control as a component in the delphi IDE:
    1. Start a new project and goto the component menu. Click on Import Active X Control
    2. From the list select Microsoft Winsock Control
    3. Click install.
    4. The winsock control should now show up in the component pallet in the ActiveX Controls pages. To use it, add it to the form like you would any other control. All the properties and methods are identicle to what they would eb in VB.

    As Delphi has direct access to the windows API, you don't actually need to import the winsock Active X control. You can use the Winsock API simply by including: uses Winsock at the top of your unit name. Although using the WinsockAPI is a little more complex than the Active X control, it has the benifits of being alot more powerful and flexible.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    Re: Using Winsock In Delphi?!

    Quote Originally Posted by visualAd
    Sorry for the late response. I swear I replied to this yesterday . Anyway, follow the instructions below to add the winsock active X control as a component in the delphi IDE:
    1. Start a new project and goto the component menu. Click on Import Active X Control
    2. From the list select Microsoft Winsock Control
    3. Click install.
    4. The winsock control should now show up in the component pallet in the ActiveX Controls pages. To use it, add it to the form like you would any other control. All the properties and methods are identicle to what they would eb in VB.

    As Delphi has direct access to the windows API, you don't actually need to import the winsock Active X control. You can use the Winsock API simply by including: uses Winsock at the top of your unit name. Although using the WinsockAPI is a little more complex than the Active X control, it has the benifits of being alot more powerful and flexible.
    No..No..No..No...
    I don't want to use the Winsock OCX
    The only reason that made me learn Delphi is to get out from the OCXs hell
    What i am asking is how to use the Client and Server Sockets (VCL)...
    I know how to make them connect and all, but how can i send text!!
    (Maybe you didn't understand what i mean because of my not so good english)
    Last edited by Shady Soft; Jul 29th, 2005 at 03:19 PM.

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Camden, London Mode: PPI
    Posts
    4,904

    Re: [Delphi]Using Winsock In Delphi?!

    I don't know of any Winsock Components. But like I said in my previous post, you can gain access to the Winsock API, which is basically what the Winsock ActiveX control is a wrapper for, by adding uses Winsock in your unit.

    After some Googling I did find these links which may be of some use though:

    http://delphi.about.com/od/networking/l/aa112602a.htm
    http://www.felix-colibri.com/papers/...ogramming.html
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.