delphi

Datasnap : Is there a way to detect connection loss globally ?

Hi everybody, I'm looking to detect local connection loss. Is there a mean to do that, as with the events on the Corelabs components ? Thanks EDIT: Sorry, i'm going to try to be more specific: I'm currently designing a protoype using datasnap 2009. So i've got a thin client, a stateless server app and a database server. What i would ...

Plugin for Tortoise SVN get Redmine's issue list, plugin in Delphi

I downloaded tortoise plugin samples, but I don't know how to implement it on Delphi. I have successfully compile C# sample, and use it on a repository, but my knowledge in C# for general development is poor. In other hande, I don't know how to start creating that plugin in Delphi, but after that I think would be easy for me. I want to...

How to judge number of buckets for TBucketList

I've been using the TBucketList and TObjectBucketList for all my hashing needs, but never experiemented with switching the number of buckets. I vaguely remember what this means from Data Structures class, but could someone elaborated on the nuances of this particular class in Delphi The following table lists the possible values: Valu...

What are the advantages of c# over, say, delphi/realbasic for windows applications

has anyone ever written an application bigger than its .net luggage? People used to criticize vb6 for its 2 MB runtime but it rarely dwarfed the app it accompanied. Today despite having vista on my machine I had to download 35 MB of the 3.5 framework and reboot to then try out an app half that size. When you factor in the decreased sou...

Array Property, TList, TStringList, or TCollection, etc (Delphi Win32)

I am developing various components, and regularly run into the need to have a property that has a "one-to-many" relationship, component-to-property-member. The components are often visual components, but not always, and sometimes need to be registered with the IDE (i.e. use the Property Inspector), but not always. I find myself unsure ...

How / if to refactor a Delphi program using only forms and data modules

After years of coding Delphi programs as untestable code in forms and datamodules, including global variables, and the only classes are the forms themselves, containing all the code I need for the form UI itself. How would I convert the code to a set of classes that do the actual work? would I need to stop using the datasources/datasets...

What happens when AnsiString is cast to PAnsiString?

I have the method (Delphi 2009): procedure TAnsiStringType.SetData(const Value: TBuffer; IsNull: boolean = False); begin if not IsNull then FValue:= PAnsiString(Value)^; inherited; end; This is an abstract method on the base class, where "Value: Pointer" expects the pointer of the corresponding data, as: String = PString Ansi...

Delphi Barcode Reader Code

Anyone know of an opensource Barcode reader for Delphi, that reads barcodes from a webcam? Update: Thanks for all the help. I found that purchasing a cheap barcode scanner was much more efficient :) . ...

Is there any good XPath Library for Delphi 2007 or above?

I have created my own XPath library for Delphi 2006 and have used it since. It works fine but could have more performance, and I don’t really have the time to maintain it any more. What other library could I use? ...

Is it possible to use WPF and Delphi 2007/09 win32?

Is it?! Possible? ...

Dynamically creating a sub-menu in Delphi

I have a popup menu and I want one of the items to open a sub-menu with a dynamically created list (it's a list of user defined flags). Here's how I'm creating the menu items (FlagAs is the menu item I want to attach the sub-menu to): lNewMenuItems: array[0..flagCount] of tMenuItem; for I := 0 to flagCount do begin { Create a new men...

Delphi: How to calculate the SHA hash of a large file

Hi I need to generate a SHA over a 5 Gig file Do you know of a non string based Delphi library that can do this ? ...

IDL, ODL, MIDL, DLLs but not COM if I can help it.

Using Matt Curland's Type Library Editor, I wrote a Typelib for Nick Yakowlew's Charset Detector Library. This is a standard DLL (written in Delphi as it happens) and not a COM DLL at all. Up until this point I had been building ODL and thus TLB files "by hand". The benefit of this was that I could get Intellisense working in Visual Stu...

How to know what type is a var?

TypeInfo(Type) returns the info about the specified type, is there any way to know the typeinfo of a var? var S: string; Instance: IObjectType; Obj: TDBGrid; Info: PTypeInfo; begin Info:= TypeInfo(S); Info:= TypeInfo(Instance); Info:= TypeInfo(Obj); end This code returns: [DCC Error] Unit1.pas(354): E2133 TYPEINFO stand...

Indy 10 IdTCPClient Reading Data using a separate thread?

Hi All, Question: What I'm looking for is the most typical or best practice way to use a separate thread to receive data using an IdTCPClient in Indy 10. Background: The below code is a sample of what I'm trying to do with the actual data processing parts removed for clarity. The Idea of the Thread is to receive all data (Variable siz...

Search Words in pdf files

Is it possible to search "words" in pdf files with delphi? I have code with which I can search in many others files like (exe, dll, txt) but it doesn't work with pdf files. ...

Delphi MSBuild Build Configurations From Command Line

Delphi 2009 uses build configurations. When you create a new project you have two default build configurations "Debug" and "Release". Now I asked myself how to automate builds using MSBuild (which is supported by Delphi since version 2007). You can start the "msbuild" command in the "RAD Studio Command Prompt" in some Delphi project di...

Use Googlemap from my Delphi application ?

I'm a member in a team that maintains a quite big inhouse Delphi application. Now we have started to look at mapsupport. And we feel that Googlemap seems to be the best value for the money compared to some map components. The current solution (that is really bad) works by starting Internet Explorer from ShellExecute, load some coordinate...

Measuring network traffic with Indy

Hello alltogether, I'm using a TIdTCPCmdServer to handle all communication with client applications. I would like my server to log all kind of stuff including network traffic. Is there any easy or clever way to see how much bytes the TCPCmdServer actually received and sent? I can only think of code like ASender.SendReply; Inc (FTraffic...

How do i return an object from a function in Delphi without causing Access Violation?

I have a delphi function that returns a TStringList, but when I return a value and try to use it I get a Access Violation Error i.e myStringList := FuncStringList(); myStringList.Items.Count // <-- This causes an access violation // function FuncStringList function FuncStringList:TStringList; var vStrList:TStringList; begin vStr...