indy

Robust unidirectional messages with Indy

I have a client application that should send notify messages to an optional server application. The client should not be influenced by whether the server appliction exists or not. It should try to connect to the server application and send the notify message and in case of errors it should just silently ignore all errors and continue wor...

Why do I get an AccessViolation in Indy Sockets 9 IdTcpServer ServerExecute?

First Question: Is the following routine a correct implementation of an Indy 9 IdTcpServer.OnExecute routine? procedure TMyConnServer.ServerExecute(AContext: TIdPeerThread); var buffSize: integer; str: string; begin AContext.Connection.ReadFromStack(True, 600, False); buffSize := AContext.Connection.InputBuffer.Size; if ...

TidTCPServer Upgrade Problems

I've recently needed to upgrade an old Delphi 6 project to Delphi 2007. It is a server application using the Indy TidTCPServer component. I've followed all the examples I could find on upgrading to Indy 10. The application interfaces with an old VB6 application (that we do not have the code for) via TCP/IP. I'm having a difficult tim...

How can I use NTLM authentication in a Delphi SOAP Web Service client?

For a Microsoft CRM project, we need NTLM authentication in the Delphi 2009 web service client. It looks like Indy 10 Tiburon already has experimental NTLM support. How can I activate the NTLM authentication for the THTTPRio component and use the logon information (user name, password, domain) of the destination web service server? Ed...

Delphi + Indy: Connection closed gracefully

Using D7 + Indy 10 latest build. My code is using TIdSMTP to send email. I keep getting "Connection closed gracefully" at some end-users, and the email is never sent. The code is like: try ~~~~ ~~~~ _idSMTP := TIdSmtp.Create; with _idSMTP do begin Host := 'myhost'; Connect; try Send(_EmailMsg); Result := True; except ...

Added the {APPTYPE CONSOLE} directive and now my application runs very slowly. Moving the mouse makes it run faster.

I am trying to extend a 3rd party application so that it can be invoked via command line in addition to using the windows form GUI (mixed mode is desired). It's a fairly simple program which basically loads a file and then you click a button it starts sending UDP network packets. I need to invoke the application from another and would...

How to get images from URL in Delphi

Hello, I am looking for any code samples that show how to pull images from URL into Delphi TImage component. Thanks, ...

Store a screen capture (Bitblt) in a memory buffer to send over IdTCPClient

In c++ builder 6 on windows vista ... Graphics:: TBitmap * bmpscreencapture = new Graphics::TBitmap; bmpscreencapture-> Height = Screen-> Height; bmpscreencapture-> Width = Screen-> Width; HDC ScreenSrc = GetWindowDC (0); BitBlt (bmpscreencapture-> Canvas-> Handle, 0, 0, Screen-> Width, Screen-> Height, ScreenSrc, 0, 0, SRCCOPY); Canvas...

How to have an SSL Certificate installed in an Indy Server and seen as trusted?

Using Delphi 2007, Indy 9 to build a standalone Server working in Secure mode. I used SSLBuddy to generate the certificate request, got a root certificate and a standard certificate from GoDaddy, a MyDomain.crt, (I selected the "other" type as web server). I then used SSLBuddy to generate the key and cert files passed to the TIdServer...

is WSAASyncSelect good enough? Could you suggest an alternative? Is Indy better?

Hello, I never liked components for winsock programming,I loved it in its natural way,but today my collegue told me to use Indy for my project.Could you tell me if Indy better alternative for my project? -2 TCP servers,2 TCP clients.4 sockets total -The project is a proxy. And now the second question,I read daily that WSAASyncSelect i...

Delphi Indy IdTcpClient read operation returning truncated data for one specific request

This is an interesting problem that I’ve not been able to solve yet. I am writing a client that communicates across the Internet to a server. I am using the TIdTcpClient Internet Direct (Indy) component in Indy 10 using RAD Studio 2007 native personality. To get data from the server, I issue an HTTP request using SSL over port 443 whe...

Improving UDP message handling

I've got a PC program receiving data from 20 custom hardware boxes via UDP. Each of these boxes continually sends UDP messages to a single UDP socket on the PC. The messages all contain 10 - 150 bytes of data, and each unit sends about 20 messages in 12 seconds. Testing shows that some messages are being missed by the PC. Fewer boxes on...

Post Data to ASP .NET page using Delphi and TIdHttp

I have an Asp .net page like this simple one http://issamsoft.com/app2/page1.aspx and I want to post to it some data and extract data from the response, by using TIdHttp. I tried to do that in Delphi2009 like this: Procedure TForm1.Button1Click(Sender: TObject); Const VIEWSTATE = '/wEPDwUKMjA3NjE4MDczNmRkSxPt/LdmgqMd+hN+hkbiqIZuGUk='; ...

Indy FTP TransferType

I'm using the IdFTP (Indy 10) component to download some files (zip and txt) from a remote location. Before getting each file I set the TransferType to binary. IdFTP.TransferType := ftBinary; IdFTP.Get(ASource, ADest, AOverwrite); I expect that both text and binary files can be downloaded using the binary mode. However it looks like t...

Howto determine if connection is still alive with Indy?

I use Indy for TCP communication (D2009, Indy 10). After evaluating a client request, I want to send the answer to the client. I therefore store the TIdContext, like this (pseudocode) procedure ConnectionManager.OnIncomingRequest (Context : TIdContext); begin Task := TTask.Create; Task.Context := Context; ThreadPool.AddTask (Task...

Delphi 6 and Indy SSL connection not working

Hi, I need to consume a Web Service via SSL. In order to accomplish that I have built a web client in Delphi 6 that uses Indy to read the client certificates and write the soap request via https. The compilated version of the code is a DLL that runs in IIS 5.0. After tested the code in my local machine it works fine (I'm behind a proxy)...

app using TIdFTP not migrating from Delphi 5 to Delphi 2009...corrupt uploads

i wrote a Delphi 5 app that uses TIdFTP. it's been working great for years. it's only purpose is to upload an excel file. object ftp: TIdFTP OnStatus = ftpStatus IPVersion = Id_IPv4 AutoLogin = True Host = 'somewhere.ca' Passive = True Password = 'guess' TransferType = ftBinary Username = 'xray' ProxySettings.ProxyTy...

loading image from URL - How to capture the exception if the image is not there

My problem relates to the other question I have asked about loading image from the URL. The code below works. However, I have encountered the problem if I try to get the image (it suppose be there) but apparently was removed. The application does not know and returns the error. Is there a way to prevent it by capturing incoming error. ...

Missing ssl library when connecting to pop3 over ssl from an activex developed in delphi-7 whith indy client 9 ?

Hello, I'm developing an activexform with delphi 7 using the indy client (v.9) to connect to pop3 over ssl. Unfortunately when I load the activex in the web browser it tells me that it can't find the SSL library (ssleay32, libeay32). Does anybody know how can I work around this? (or Does anybody know any other method to connect to pop3...

TIdTCPServer not reading data from socket sometimes.

Hi I have the following code in the OnExecute of a TIdTCPServer (Delphi 2009 and Indy 10 that came with the installation) which is very similar to other examples on this site; Socket := AContext.Connection.Socket; if Socket.CheckForDataOnSource(10) then begin if not Socket.InputBufferIsEmpty then begin So...