delphi-2010

How can I update a DataSnap server while clients are still connected?

女生的网名这么多〃 提交于 2019-11-28 01:15:17
问题 We use stateful DataSnap servers for some business logic tasks and also to provide clientdataset data. If we have to update the server to modify a business rule, we copy the new version into a new empty folder and register it (depending on the Delphi version, just by launching or by running the TRegSvr utility). We can do this even while the old server instance is running. However, after registering the new version, all new client connections will still use the currently running (old) server

Adding files to the DPR file vs project paths in Delphi 2010

ぐ巨炮叔叔 提交于 2019-11-27 23:56:21
We are just migrating from D7 to D2010 and are having a debate about cleaning up the project paths. We have a number of directories with a large number of Pas files that are included on some project paths, but only a few of the files are actually used by any single project. One option is to eliminate the project paths completely and only have all used files in the dpr. The second option is to keep only the needed files in the dpr and have project paths to the directories for the rest of the files. Is there any argument for one option over the other? Having all your units explicitly in the dpr

Multiple Delphi versions on the same machine

笑着哭i 提交于 2019-11-27 23:38:16
What we would like to do is install multiple Delphi versions on the same machine, those versions are D7, D2010 and DXE. We had previously D7 and D2010, worked OK together(had to duplicate components for D7 and D2010 because of special conditions for various versions), however, I'm not sure about XE, hence the question. Of course we could experiment, but that means wasting quite a few hours, so if someone already had made a similar setup or actively have, can you please share you experience? EDIT1 : The D7-D2010 install was performed in chronological version order: D7 + updates D2010 + updates

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

ぃ、小莉子 提交于 2019-11-27 23:16:54
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? The best way would be to use WideString. For several reasons. It is Unicode and works before D2009 It's memory is managed in ole32.dll, so no dependency on either Delphi's memory manager or the CLR GC. You do not have to directly deal with pointers In Oxygene, you could

Thread-safe in delphi

人走茶凉 提交于 2019-11-27 21:38:57
I have to modify and change some visual components in a thread and as you know it's not safe to doing this. My question is how to write a completely thread-safe code? It is possible? if it is then can you please give me a simple example? my code that is not threadsafe: type tMyWorkerThread = class(TThread) public procedure Execute; override; end; var Form1: TForm1; implementation {$R *.dfm} procedure tMyWorkerThread.Execute; begin //codes //working with visual components end; procedure TForm1.Button1Click(Sender: TObject); begin TMyWorkerThread.Create(false); end; Thank you. Writing a thread

Delphi pre-build event not executing BEFORE compile

▼魔方 西西 提交于 2019-11-27 20:46:30
I'm busy automating our builds to include the svn revision number. We're using Delphi 2010. I added a pre-build event calling a batch file that injects the the svn revision number (read from the entries file in the .svn directory) and a specified version number into aVersionInfo.rc that is compiled with my project. The pre-build event looks like this: call SetVersionInfo.bat 6 5 4 ...and the batch file (hope someone finds this useful)... @ECHO OFF SETLOCAL setLocal EnableDelayedExpansion SET _myVar=0 FOR /F %%G in (.svn\entries.) DO ( IF !_myVar! LSS 3 SET /A _myVar+=1 & SET _svn_dir_rev=%%G )

Proxy server using Indy

时间秒杀一切 提交于 2019-11-27 20:41:41
I'm new to Indy and I want to build a simple proxy-server with it. This is a quite big library, and I just don't know where to start. When client connects to server, OnExucute fires up and receives client connection as parameter (AContext.Connection). I want to do following: [client connection] := AContext.Connection read host/port from [client connection] [remote connection] := connect to host/port while both connections alive: if data available in [client connection]: read data from [client connection] write data to [remote connection] if data available in [remote connection]: read data from

Selecting a directory with TOpenDialog

橙三吉。 提交于 2019-11-27 18:06:54
I'd really like to know the various ways I could select a directory with the TOpenDialog, whether it be downloading a new component or using what is provided by Delphi, but preferably using what is provided by Delphi. Prior to this, I have been using the SelectDirectory command but I think it'd be a difficulty for the users of my program to look for the specified directory. I think the SelectDirectory is 'weak' because it can be a long process when searching for the directory you want. Say for example, you want to navigate to the Application Data directory. How long or difficult would it be to

What is the fastest XML Parser available for Delphi?

瘦欲@ 提交于 2019-11-27 18:00:27
We have reasonably large XML strings which we currently parse using MSXML2 I have just tried using MSXML6 hoping for a speed improvement and have got nothing! We currently create a lot of DOM Documents and I guess there may be some overhead in constantly interacting with the MSXML2/6 dll Does anyone know of a better/faster XML component for Delphi? If anyone can suggest an alternative, and it is faster, we would look to integrate it, but that would be a lot of work, so hopefully the structure would not be too different to that used by MSXML We are using Delphi 2010 Paul Recently I had a

How to fix broken context sensitive help in IDE of Delphi 2010

╄→гoц情女王★ 提交于 2019-11-27 16:57:56
问题 After working for quite some time, my D2010 help system broke. Highlighting a keyword like TStringList and hitting F1 results in the message "No help found for context." Putting the cursor in a property field (like ModalResult) in the property editor and hitting F1 shows an hourglass and that's all. Clicking on the IDE's main menu Help and then Delphi Help works. I can type TStringList into the search field (in the Microsoft Document Explorer that appears, loaded with "What's New -