delphi-2007

Why does line count change so much from D2007 to D2010?

烂漫一生 提交于 2019-11-30 03:12:43
问题 Our app at work is a huge project with over 3000 units, weighing in about 3.5 million lines of code. ...or at least it was when we were compiling it under D2007. We recently updated to D2010, and now if we run a full build, the line count finally stops at about 4.9 million. Same DPR, same code base, same everything, but the compiler's somehow running over about 40% more lines of code in the build cycle and nobody here knows why. Just to make things more confusing, after building, we can go to

Detect disk activity in Delphi

放肆的年华 提交于 2019-11-30 02:29:29
I'm using Delphi 2007. I am copying files to a remote drive. When the copying ends, I shutdown/standby the machine. It can happen that some files don't get copied from buffer to disk, and the remote disk gets disconnected, so the backup is not completed. I need to detect disk activity on that disk to properly be able to take the close action on the machine. Is there a way to detect disk activity in this scenario? (Please move the additional information from the comment to your question.) AFAIK there is no Windows API to tell whether all data has been written to disk. What you are looking for

delphi prototype pattern

限于喜欢 提交于 2019-11-29 22:09:45
问题 I was wondering, is there anything in the RTTI of Delphi that will do the same as MemberwiseClone does in C# for the simple implementation of the prototype pattern. I saw some Delphi implementations of this pattern where a new object is being created (TMyObject.Create) and it's properties assigned with values from the prototyping object. I might be wrong, but I don't see the benefit of the pattern if we the objects are created in that same basic manner. Thank you. 回答1: There's nothing built

How do I get TAnimate's Common AVIs to work on Vista and Win7?

狂风中的少年 提交于 2019-11-29 16:50:46
问题 I have a Delphi 2007 application that has a TAnimate control with a FindFile Common AVI. It works perfectly when the application is run on Windows XP, but nothing ever appears on Windows 7. I've heard it now requires its own thread, but I am not certain. Does anyone know how to get TAnimate's Common AVI control to work on Windows 7 (or Vista)? 回答1: You must add the unit ShellAnimations to you project or add the component TShellResources from the Win32 tab of the component palette. (Tested in

How to install classes or units like components in Delphi 2007?

删除回忆录丶 提交于 2019-11-29 15:39:45
I'm writing a package in Delphi 2007 containing a component and several classes. I want to "install" the classes as well as the components. To be more precise: when a component is installed, the unit is somehow registered such that it is not necessary to add its path to the search path in the project. I would also like to do this with a few extra units that do not contain components: if I can somehow register the root of the package, I'm done. Is this possible? EDIT: In one sentence the objective is: If somebody installs my package, it is not necessary to add the path to the units in the

How can I get the tooltips of notification-area icons?

放肆的年华 提交于 2019-11-29 15:02:16
问题 I can enumerate the applications (handle,pid,path) with icons in the notification area, and I can control the position of the icons, but I can't get the tooltip. How can I enumerate systray icons including the tooltips? 回答1: Here is my method tested with windows xp and delphi 2010 if you are using a version of delphi wich doesn't support unicode make shure you convert the strings read to ansi uses CommCtrl; function TForm1.GetIconsCount: Integer; begin Result := SendMessage(FindTrayToolbar,

How do I turn specific Delphi warnings and hints off?

余生颓废 提交于 2019-11-29 14:14:20
In CodeGear Delphi 2007, how can I turn specific warnings and hints off? I am attempting to turn off H2077 - Value assigned to 'varname' never used. Lars Truijens Hints? No specific . You'll have to disable them all: {$HINTS OFF} Warnings? {$WARN _name_of_warning_ OFF|ON|ERROR} Check here for a full list You are not able to disable specific hints like you can with warnings. Hints are those things that would not have any potential adverse affects on your runtime code. For instance, when you see the hint "Value assigned to 'varname' never used" it is merely a suggestion for something you should

Removing the namespace from SOAP request

夙愿已清 提交于 2019-11-29 12:57:02
问题 I have imported a WSDL and use it to send a SOAP request. It looks like this: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <Calculate xmlns="urn:xx.WSDL.xxxxxWebService"> <ContractdocumentIn> <AL> ...More XML... The problem is the xmlns="urn:xx.WSDL.xxxxxWebService" part in the Calculate element. The web service cannot

Run application or Process on a remote computer

冷暖自知 提交于 2019-11-29 10:15:51
问题 I need to run an application or service on a remote computer. I have had success with psexec from SysInternals, but I am investigating and would like to compre alternatives. Ultimately the command will be run from within a Delphi application. Thanks, Pieter. 回答1: If you want to follow the PSexec-like route, here is an example (with C++) source, called XCmd. Or you can download the updated XCmd project (now called 'The Grim Linker') from SourceForge. Essentially, it extracts a service at run

Which is the correct way to start a suspended thread in delphi 2007?

萝らか妹 提交于 2019-11-29 06:56:39
in delphi XE i can use the start procedure, but this method does not exist in delphi 2007. this sample code works ok in delphi xe, using Start MyThread:=TMyThread.Create(True); MyThread.FreeOnTerminate :=True; MyThread.Property1:=900; MyThread.Property2:=2; MyThread.Start; but in delphi 2007 the start procedure does not exist, so i am using the resume procedure wich is deprecated in the new versions of delphi. MyThread:=TMyThread.Create(True); MyThread.FreeOnTerminate :=True; MyThread.Property1:=900; MyThread.Property2:=2; MyThread.Resume; so the quieon is, It's ok use resume in delphi 2007 or