delphi

Delphi Keyboard Hook

I'm having an interesting problem implementing a global keyboard hook. I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%. I've just tested the same app...

Which tool do you suggest, to convert a legacy delphi 7.0 app to c#

A simple google query shows a bunch of tools, which seems to convert Delphi to C# code. Example: http://www.google.de/search?q=delphi+c%23+converter Do you have experience with one of this tools or the approach of migration source from Delphi to the .NET platform? Is this a viable option? Our general conditions: Delphi 7.0 Platform...

System Error. Code: 8. Not enough storage is available to process this command.

We have a few Win32 applications (coded in Delphi 2006) where sometimes the user gets an error message saying "System Error. Code: 8. Not enough storage is available to process this command.". From the stacktrace it looks like it is always during CreateWnd call Main ($1edc): 004146cc +070 app.exe SysUtils RaiseLastOSError...

Delphi form creation without freezing main thread

Hello everyone. I am having trouble with something i wanna do. I have some big forms which take some time to create. To make the app load faster i thought of letting the forms be created in a thread which is created at main form's OnCreate event. The thread has a FApplication field of type TApplication which obviously is the Application...

Delphi 2009 classes / components to read/write file permissions

Does anyone have a set of classes / components that will work with Delphi 2009 (Unicode) to read and write NTFS file permissions? There was a thing called "NTSet" - but they stopped development at Delphi 2006 about 3 years ago :-( Any other takers?? Thanks! Marc ...

Can Delphi 2009 build web service that returns a DataSet?

In the sample Delphi web service tutorials I've read, they tend to build a web service that returns a simple string or integer, e.g. http://blogs.codegear.com/pawelglowacki/2008/12/18/38624 However, I read it's possible in .NET to build a web service that returns a DataSet or even an object. Is this possible in Delphi 2009, and if so w...

In Delphi, is outputdebugstring thread safe?

Simple question i belive, is outputdebugstring(pansichar('')); Thread safe? I/We have been using it in threads for debugging, and i never occurred to me if i should be doing it a different way. (delphi7) ...

Finding a Memory Bubble

This is either ridiculously simple, or too complex . . . . In our application there is a form that loads some data from the database and displays it in the grid (putting it simply). When the data is refreshed the total memory usage climbs by about 50K (depending on how much data is displayed no doubt). Sounds like a memory leak, but w...

List of Delphi data types with 'atomic' read/write operations?

Are 'boolean' variables thread-safe for reading and writing from any thread? I've seen some newsgroup references to say that they are. Are any other data types available? (Enumerated types, short ints perhaps?) It would be nice to have a list of all data types that can be safely read from any thread and another list that can also be ...

ReverseString

How can I use the ReverseString function in Delphi2009? ...

DELPHI and WANT or NANT

We use cruise control .net to do our Continuous Integration in our Delphi 2006 application. We use a setup similar to the one described here. QUESTION: 1) What is the best scripting tool/language to use implement the build script? 2) Are there any advantages of using WANT over using NANT? (NOTE: D2006 is not compatible with MSB...

100% CPU usage in Delphi

I use Indy 9 with Delphi 5. In my application I want to communicate with a network device via UDP. So I use UDPServer comp. in a class which is derived from TThread. When I write similar to the following code then CPU usage is 100%. in the thread : while not terminated do begin if GetMessage(Msg, 0, 0, 0) then begin if Msg.messag...

How to convert OWL/BP7 application to Delphi?

Which tool/approach would you suggest to convert of a large 16bit Windows GUI application, written in old Borland Pascal 7 / OWL, to Delphi? Understanding the pretty heavy differences between OWL and VCL, as well as the differences between the pointer manipulations in 16bit pascal and the state-of-art using of strings and objects in De...

Howto cast pointer to generic parameter type?

Hello everybody, it's my first question here, glad to have found this site. My question deals with the new Generics feature in Delphi 2009. Basically I tried to write a generic wrapper class for an existing hash map implementation. The existing implementation stores (String, Pointer) pairs, so in the wrapper class I have to cast between...

Memory Leak in TDictionary - Problems with Workaround?

Hi everybody, I just considered using the new TDictionary type. But On QualityCentral I read about two memory leaks caused by TDictionary: http://qc.codegear.com/wc/qcmain.aspx?d=67355 I just implemented the proposed workaround, basically subclassing TDictionary, overriding the destructor and manually freing the two objects that cause...

Delphi 2009: Is it possibly dangerous to use TList<[any interface]> with default comparator?

Hello everyone, I am wondering if the usage of a generic TList<T> where T is any interface type (except IUnknown/IInterface) might be dangerous. I am heavily using interfaces and store them in lists. Some interfaces are my own, some are provided by some COM-interfaces, so COM is involved. I see a potential problem where checks for inst...

How do I send a string from one instance of my Delphi program to another?

What is the best and easiest way to send a string from one instance of my program to another instance of my program? The receiving program has to execute a procedure, using the received string as a parameter. I started reading about DDE but I got confused. What other options do I have, and what is the easiest way to implement this? ...

Delphi control that could mimic "Add-ons|Extension list" of Firefox?

My aim is to update the look of the GUI in my app. Currently my GUI contains a lot of listboxes which are used to edit some objects in an old fashioned way, that is, user double-clicks an item and a dialog is shown to modify the corresponding object. I think a good modern approach is how Firefox displays the extensions installed (a sna...

Delphi Prism / VS 2008: Switching from code to design with one key?

I've used several Versions of the Delphi IDE for many years. When i'm using Delphi Prism, i have to deal with Visual Studio - in my case especially VS 2008. One of the most annoying things to me is that i have to right-click on my form to switch to the code editor and vice versa. In Delphi, one could simply press the F12 key to switch be...

Is Delphi "with" keyword a bad practice?

I been reading bad things about the with keyword in delphi but, in my opinion, if you don't over use it. It can make your code look simple. I often put all my TClientDataSets and TFields in TDataModules. So in my forms I had code like this procedure TMyForm.AddButtonClick(Sender: TObject); begin with LongNameDataModule do begin ...