delphi

How to add code inside a program in runtime (Delphi/Windows)?

I'm working on Windows XP/Delphi 7. I need to add some procedures (or functions) inside a program that is running, and I do not want to re-compile it once again after I finished it. I just have a host application with 5 functions to send different types of alarms, but there are other new alarm types, so I have to do new functions to se...

Is Installshield the only way to go for Delphi Installations?

Or is there anything cheaper and better? I am still using the Installsheild express (Borland Limited Edition) as supplied with Delphi 6 :) but I "feel" that I should update it – am I going to gain much or anything buy buying the 2010 version? The old version does work on Vista. I am using Delphi 2009. Any opinions or a definitive ye...

detecting windows shell changes

I have very limited knowledge of using C Builder, could you give me an example or point me to tutorial showing how to use FindNextChangeNotification in Delphi or ,if it is possible, how to use the C component in delphi? ...

Determining Delphi Runtime Packages to Include

I have a Delphi DLL that houses a form which uses a variety of third party components. This DLL is used by many different versions of Delphi. I compile the third party components into the DLL. I believe I still need to link to some "base" Delphi packages like rtl, vcl, etc, so my DLL will use the same memory manager and other global reso...

Delphi: Good pattern/strategy for view <-> model synchronization

There's a lot of talk about model-view-controller, model-view-viewmodel, model-view-presenter and so on these days. What do you see as the best pattern for use with delphi and non-data aware components? How do you usually implement it? ...

Actual width of a text/caption in Delphi 7

I believe this question was already asked, but it was in Java, so I couldn't understand the solution. Here is my problem, I want to know actual length of the text in pixels (note that various letters have different length in some fonts). I am going to use this for better column width adjustment in DBGrid. Thank you, Tofig Hasanov ...

Discovering the class where a property is first published with multiple levels of inheritence.

Using the Typinfo unit, it is easy to enumerate properties as seen in the following snippet: procedure TYRPropertiesMap.InitFrom(AClass: TClass; InheritLevel: Integer = 0); var propInfo: PPropInfo; propCount: Integer; propList: PPropList; propType: PPTypeInfo; pm: TYRPropertyMap; classInfo: TClassInfo; ix: Integer; begin ...

How to read log-files over network real fast ?

I'm using Delphi 2007 and have an application that read log-files from several places over an internal network and display exceptions. Those directories sometimes contains thousands of log-files. The application have an option to read only log-files from the n latest days bit it can also be in any datetime range. The problem is that the...

What is easiest way to merge two or more pdf files in Delphi?

I'd like to be able to merge multiple pdfs into one file using Delphi 2009. I'd be willing to look at third party components for this. Please do not suggest Gnostice's products - I have tried to use them for this and have been disappointed so far. ...

Can we replace use TDSProviderConnection to replace TLocalConnection for in-process DataSnap application?

I able to access server method by in-process DataSnap application. Click here for details. However, there is another aspect of in-process datasnap application. It is the IAppServer or TDataSetProvider. Prior to Delphi 2009, I use TConnectionBroker with TLocalConnection for in-process datasnap access. The new Delphi 2009/2010 DataSnap a...

Determine if running as VCL Forms or Service

I have code which is used both in services and within VCL Form applications (win32 application). How can I determine if the underlying application is running as a NT Service or as an application? Thanks. ...

Crystal reports in Delphi 2007

I have: Delphi 2007 Crystal 11 The Delphi 7 version of the Crystal VCL component (latest one I'm aware of, and it compiles fine in D2007) A very simple test Crystal report, written in Crystal 11, which just dumps a table onto the screen (no selection criteria, no formulas, just straight data) I tried Created a new VCL forms app Dr...

How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode

Hi, As 64 bits support is not expected in the next version it is no longer an option to wait for the possibility to migrate our existing code base to unicode and 64-bit in one go. However it would be nice if we could already prepare our code for 64-bit when doing our unicode translation. This will minimize impact in the event it will fin...

Generate HTML e-mail with embedded images in Delphi

Anyone know of a good example of generating HTML e-mail with embedded images and an alternate text part? I need to generate some tabular reports in HTML and would like to embed logos and other images. I believe Indy can do this with some work, but I was hoping someone could point me to a good example as a starting point. I am open to us...

Gooogle OAuth with Indy in Delphi

I am using Indy10 with Delphi and trying to get Google's OAuth to work. The first step is to make a request to the OAuthGetRequestToken method. The code below returns a 400 error. Any help would be greatly appreciated. procedure TForm1.Button1Click(Sender: TObject); var IdHTTP: TIdHTTP; IdSSLIOHandlerSocket1: TIdSSLI...

Delphi and XQuery/XPath 2.0?

How do people use XQuery and/or XPath 2.0 from Delphi? I've got MSXML v6.0 working from Delphi, so any sufficiently documented COM-implementation will work. What's your favorite? ...

Right to left TListView

I am programming a tlistview so that it displays its columns from right to left (so as to properly display Hebrew text). I am using the following code in the form's create method, where 'lv' is the listview SetWindowLong (lv.Handle, GWL_EXSTYLE, GetWindowLong(lv.Handle, GWL_EXSTYLE) or WS_EX_LAYOUTRTL o...

How can I work with Chinese characters from a database?

I am facing problem capturing Chinese characters in a dataset. In Delphi 2010 I have tried two kinds of components: Delphi default Developer Express components As result, those components that do not link to the datasource are working fine, but those components do that link to the datasource have a problem. The Chinese characters ha...

Determine RasEntry structure size use RasGetEntryProperties in Delphi

I'm trying to create a DUN entry. I am calling RasGetEntryProperties with a lpRasEntry parameter of null. This should return the structure size in the lpdwEntryInfoSize parameter. Instead it returns an error - ERROR_INVALID_SIZE. How do I call the RasGetEntryProperties function to get the RasEntry structure size? ...

Delphi 2007 and Logitech Webcam Driver

A while ago I had this issue with Delphi 2007 unable to run and debug apps while the logitech webcam driver runs. Apparently the Logitech Driver inserts a stub into every process running, thereby messing up the debugger's offset. It's been a year and a bit - is this still an issue? Has Logitech cleaned up their act or do I have to dump...