delphi

Find largest free memory block

There is sometimes a problem with running out of memory when it got fragmented. Is it possible to find the largest free memoryblock ? I use Delphi 2007 with FastMM. Developing on Windows XP running app on Windows 2003. Regards EDIT: I could add the info that the app is running on a server with 32 GB memory on a Windows Server 2003 x6...

sending files with TClientDataSets

Hi all How do i send files using TClientDataSet? i am using Delphi2010 thanks vladimir. My appologies for the confusion, my intention is to send/tranfer pdf files from one TCLientDataSet to Onother... we are using MIDAS... thanks ...

Delphi: Calling a function from a vc++ dll that exports a interface / class

Hello, i have some trouble accessing a dll written in vc++ that exports an interface. First i tried to use classes, but after some google-search i came to the solution, that this i not possible. I just want to make sure, that the plugin interface can accessed, by using other languages like c++. Delphi Interface IPlugIn = interface fu...

Do time zone specification in XMLMapper works ?

Hi all, I receive DateTime in XML file like this 2009-12-14 05:07:38Z. So, I thought it was a mistake but after little googling, I find this : http://www.w3schools.com/Schema/schema_dtypes_date.asp Time Zones To specify a time zone, you can either enter a time in UTC time by adding a "Z" behind the time - like this: 09:...

Delphi, installers and Windows 7

As part of a general move to Windows 7 - where all applications should have an "installer experience", I need to create installers for all of our application suite. I have looked at InstallShield, but this seems extremely expensive for what it does. What install products could I look at? The installers will need to be built unattended ...

The guard has gone beserk (or how do I keep multiple MAPI clients running together?)

I have a standalone program that I am trying to hook into MAPI to send emails automatically using the default system (Outlook for the most part) available. For the most part, it works quite well, and everything sends fine. However, after a while, Outlook will start to flip out about my program's accessing the MAPI system, and will star...

How call lockWindowUpdate using DelphiPrism

How can I call lockWindowUpdate using Delphi Prism? ...

Delphi to C++ GetModuleBase function conversion??

I'm no delphi wizard but I found this function on a board and I need it badly for C++, Is there somebody who knows Delphi and C++ well enough to convert it? function GetModuleBase(hProcID: Cardinal; lpModName: PChar):Cardinal; var hSnap: Cardinal; tm: TModuleEntry32; begin result := 0; hSnap := CreateToolHelp32Snapshot(TH32CS_SN...

What's the cause of this Access Violation when concatenating strings in D2007?

I have a procedure that accepts 2 string parameters, one of them has a default value. Inside the procedure, I want to concatenate one and the other and some literals to form one larger string. Somehow, I'm getting an AV... any ideas? code is something like this {$WRITEABLECONST ON} constructor MyClass.Create(s1: string; s2: string = Gl...

How would you copy a PNG image to the clipboard using Delphi

Using Delphi 2010 I would like to copy a PNG image to the clipboard while preserving the alpha transparency. Unfortunately, the TPngImage.SaveToClipboardFormat method will draw it to a bitmap and the transparency will be lost. I would like for the PNG image to be pasted in applications such as Photoshop and Word with alpha transparency....

How to add up the integer values in a label in delphi

I am currently having problems with screating a scoreboard in Delphi. I have a series of forms which are individual questions. If the questions are answered correctly, then the score is 1. Otherwise the score is -1. On my scoreboard at the moment, I have 12 labels and 11 of them contain the score for each of the forms. What I would lik...

Slow Anagram Algorithm

Hi, I have been working on an algorithm to rearranging the letters of a word, but it takes much time to find the correct word. var Form1: TForm1; DictionaryArray : array[0..2000] of string; const Numbrs : string = '123456789'; implementation {$R *.dfm} function GenerateSequence(CPoint : String; L : Integer): String; var Incre...

Cast problem in mysql via odbc and delphi

I'm debugging an old application in Delphi 5, connected with a recent version of MySql via ODBC connector. When using a CAST conversion function, even the following query: select cast(1 as char) returns an empty column without column name. If I run the query directly into the mysql query analyzer it runs fine, so I suppose the proble...

From .NET to Delphi, an ERP on Delphi

I have learned programming on .NET. It's been 4 years since I have started (serious) programming, I gained experience in VBA, JavaScript but mainly C#. I have spent a lot of time trying to grasp the good coding practices, object orientation etc. Now finally I have a job. The job is fixing/upgrading an ERP on a daily basis. Creating repo...

How to send an email using PageProducer in Delphi 7?

I am making an application in Delphi 7 and I need to send an email using PageProducer component in order to make it in HTML format. At this point, the objective is to send the email in both formats: text/plain and text/html, but really know how to send it in only one format: either text/plain or text/html. So, how to send an email using ...

How can I pass a Delphi string to a Prism DLL?

We try to pass a string from a native Delphi program to a Delphi Prism DLL. We have no problem passing integers, but strings are mismatched in the DLL. We saw Robert Love's code snippet in response to another question, but there is no code for the native Delphi program. How can we pass strings from Delphi to a Delphi Prism DLL? ...

Interfaces, Anonymous Methods and Memory Leaks

Hi, this is a constructed example. I don't want to post the original code here. I tried to extract the relevant parts though. I have an interface that manages a list of listeners. TListenerProc = reference to procedure (SomeInt : ISomeInterface); ISomeInterface = interface procedure AddListener (Proc : TListenerProc); end; No...

Scroll Wheel in Delphi 7 with CodeRush

One casualty of my brief dalliance with Delphi 2010 and subsequent return to using Delphi 7 was my acceptance of the wheel-scrolling behaviour in Delphi 7 with CodeRush installed. The scroll wheel scrolls horizontally in that environment, which I've accepted for all these many years. But it sure was nice to have vertical scrolling whil...

Dynamic Arrays and pointers in Delphi

How can i rewrite this C++ code in Delphi? int *intim = new int[imsize]; unsigned char *grays = new unsigned char[imsize]; int *intim2 = intim; How can I increment pointer like this: *(intim++) = x; ...

How to automatically copy resources to the DCU output folder.

I would like to know, is there a way to automatically make the IDE/Compiler/other copy all the resource that needs to be linked with the DCU to the DCU output folder. I often use forms that I pre-compile to avoid the needs to recompile the unit all the time in my main projects. The DCU gets updated, but we need to copy the DFM manually ...