delphi-2006

How to download a file over HTTPS using Indy 10 and OpenSSL?

I have the following task: download a file using HTTPS and authentication. Indy seems the way to go but for some reason it doesn't work so far. I have the following in place: a TIdHTTP component which I use for downloading a TIdURI component used to create the URL a TIdSSLIOHandlerSocketOpenSSL component which should provide the secure...

Data structure for fast filtering (Delphi)?

I am optimizing a part of a Delphi application where lists of objects are frequently filtered using different criteria. The objects are kept in TObjectList structures and it is common to select a very small percentage (ex. 1%) of the entire set with each filter. The total number of objects can be in the 100k range and during computations...

Is it possible to change the appearance of a Rave report's Preview form?

When users preview a report I would like to avoid giving them the option of then opening another report or saving the current report. Open and Save are items in the default menu and toolbar that appear on Rave's preview rendering form; I'd like to make them not visible. I'm using the version of Rave that comes with Delphi 2006. Thanks,...

Delphi 10, .NET, how do I convert a hex UTF-8 string to its unicode character?

Hi all, I am trying to make my web app compatible with international languages and I am stuck with trying to convert escaped characters in my Delphi .NET DLL. The front end code is passing the UTF-8 hex notation with an escape character e.g for お I pass \uE3818A. In my DLL I capture this and constract the following string '$E3818A'. ...

sprintf in Delphi?

Hi there! Does anyone know a 100% clone of the C/C++ printf for Delphi? Yes, I know the System.Format function, but it handles things a little different. For example if you want to format 3 to "003" you need "%03d" in C, but "%.3d" in Delphi. I have an application written in Delphi which has to be able to format numbers using C format...

Problem when compiling "vcl forms application" in turbo delphi for .net.

I have Turbo delphi for .net, and every time that I try to compile a vcl forms application I receive a send/close error message. It has nothing to do with with the applications, because they compile fine in other machines. The error message accuses ntdll.dll. I can compile Windows Forms Application with no problems. ...

Delphi debug a wrong unit

This is an odd behaviour by my D2006 as it happens sometimes only. I have a project I want to debug. The file I want to debug is named 'Main.pas'. I have another unrelated project with the same Unit name and sometimes the Debug prompt me the wrong Main file instead of the Main unit from the current project. This have happened to me with ...

Does Delphi 2006 work inside VirtualBox?

I'm getting a lot of error messages, as well as slow performance. ... Is there a workaround? (I heard Delphi 2007 does not work inside VirtualBox.) ...

When I add a TPanel to a TToolBar, do I get a TPanel or a TToolButton ?

When Delphi (2006) goes quantum: I've got "something" that appears to be both a TToolBar and a TPanel, depending on how you observe it. I'd like to understand what's going on. Here is how to create it and what happens: in the DFM add a TToolBar named bar; in that TToolBar, put a TPanel. in the code and at runtime: the panel appea...

Register custom form in delphi 2010 with ToolApi

Hi, I have custom form which is descendant from TForm. I used ToolApi to register custom module and add it to repository. So far so good. But when I click on File->New I can see my category with icon for my custom form but it is disabled. Icon is grayed and I cannot select it to create my custom form from menu and add it to project. ...

Why use string[1] rather than string while using readbuffer

Hi, I am having a record like this TEmf_SrectchDIBits = packed record rEMF_STRETCHDI_BITS: TEMRStretchDIBits; rBitmapInfo: TBitmapInfo; ImageSource: string; end; --- --- RecordData: TEmf_SrectchDIBits; If i am reading data into it by using TStream like this an exception is occuring SetLength(RecordData.ImageSo...

Progress feedback in stateless HTTP session

I need to program a stateless server to execute remote methods. The client uses REST with a JSON parameter to pass the method name and its parameters. After servicing the result the session is closed. I have to use Indy10, TCP/IP as protocol, and therefore look at using IdHTTPServer. Large result sets are chunked by Indy10 and sent to t...

How to set the code page of a Delphi 2006 executable

We're programming in Delphi 2006, using Multilizer 5.1 to translate the program. Now we've to added Polish as a new language in Multilizer. But when we open our executable, Multlizer says "Polish is not supported by the codepage". If we adjust our regional settings to Polish, whenever we open the executable, the regional settings flip ...

starting and stopping the screensaver

Should have been simple I would have thought. I want to force the PC to go into screen saver mode, and exit it when conditions I am checking in by D2006) app come true. It doesn't seem to work: if ScreenSaverExitRequested then begin SystemParametersInfoResult := SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, @S...

Why do I get memory errors from my Delphi 2006 app running under Windows XP embedded

I have a D2006 app that uses FastMM4 (like, it has "FastMM4" in the start of the uses clause in the DPR file). I know Delphi uses FastMM4 as it's memory manager anyway, but the downloaded version has more debug dump options. I recently tried to run the app on a single-board tablet type industrial PC running Windows XP embedded. The pr...

Why doesn't {$ifopt FINITEFLOAT ON} compile?

I have the construct: {$ifopt FINITEFLOAT ON} {$message 'FINITEFLOAT option ON' } {$else } {$message 'FINITEFLOAT option OFF' } {$endif } in my source and it won't compile! It's got to be something stupid. The error is: E1030 Invalid compiler directive: '$IFOPT' at the first line, but it is the FINITEFLOAT it's complaining abo...

Getting Jpeg error #51 when loading from BLOB with Delphi 2010, fine w Delphi 2006

I have an old application developed in Delphi 2006 that I now needed to make some changes in. In this app, I'm loading images from a MsSQL "image" field but when i compile with delphi 2010 I get the error : "raised exception class EJPEG with message 'JPEG error #51'." The code that get's the image from the database: aStream := TMemory...

How to convert between TVarRec and Variant?

Is there a standard way to convert between TVarRec and Variant values? I want to parse an 'array of const' and use the values to populate parameters in a TMSQuery. To do this I'm using a list of column names (generated from TMSQuery.KeyFields), and matching the values in the array with the column names in KeyFields (by position), then u...

Delphi application hanging up

This Delphi 2006 application has run successfully for several years. I have narrowed it hanging up to some point before it gets to the "initialize" in the DPR file so its hanging up before any written code gets executed. I press the "Run" icon and it never displays anything else, just stops running. Not much info to give, any ideas? ...

Where should I put code to execute once after my Delphi app has finished initialising?

I have functions I want to perform after my app has finished initialising and the main form has been created. I did have the code (call it ProcedureX) in the forms OnShow event, but I have just noticed that it is being called twice, because OnShow is firing twice. It fires when the main program DPR calls: Application.CreateForm(TMainF...