delphi-2010

Why am I getting the "EDBClient: Mismatch in datapacket" exception?

I'm often getting this exception "EDBClient: Mismatch in datapacket" when I call ApplyUpdates on a particular ClientDataSet. I can't reproduce on my machine and I think it started after upgrading to Delphi 2010, because this code is untouched for a long time. An additional information is that I don't use midas.dll, I compile MidasLib u...

Directsound - Problems with playback of streaming buffer filled with data from network! Using ported DirectX headers for Delphi

Back again with yet another DirectSound question, this one regarding the ways DirectSound Buffers can be used: I have packets coming in over the network at approximately 30ms intervals containing audio data that is decoded into raw wav data by other parts of the application. When the Indata event is triggered by these other pieces of c...

How to get the client IP in DataSnap 2010

Hello folks, Someone can tell me how to get the client ip of a connected session from the server side?. Thanks ...

Delphi: Prevent method names from appearing in exe

I am writting some class, that is for handling security in my exe (checking serials, trial date check etc). After I compile exe even in Release build with all debug and RTTI generation turned off, when I open my exe in NotePad and search method name in a raw data, I can see all the name of the methods, that assemble my class. There is no...

Video component for delphi 2010

I'm moving a project from D7 to D2010 (and from XP to Win 7). I use a freeware video component to bring in video from a webcam (Video for Windows) and take a snapshot. Before I look to port this to 2010, I was wondering if anyone knew of a cheap video component that is 2010 compatible? ...

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

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...

D2010 compiled line count discrepancy

When building a project there are two places where source line count is reported: On the compile progress dialog Under Project | Information In Delphi 2007 these two numbers were identical for the project we are building. In Delphi 2010 these two numbers are wildly different. The (1st) count is larger by a count of 1 million lines o...

Problem with "Include file search path" in Delphi 2010

I've installed Delphi 2010 and Quick report 2010 recently. the problem is finding DCU files of the quick report packages when i'm trying to compile the project although the path of the installed package of Quick Report has been added to "Include file search path" of resource compile. How i can specify the path of installed packages in ...

How to "automatically" remove unused units from uses clause?

Does anyone know of a utility that can will automatically detect/remove unrequired units from the uses clause? Preferably it can be run againt a unit and/or a project. Preferably free and works with Delphi 2010. Thanks in advance. ...

Surprising error in a Delphi program

I am using this unit in a Delphi 2010 application to tell me what Active Directory Groups a user is a member of. I created a brand-new test vcl forms application, added the unit from that link, and made a little form with an edit box for the username, another edit box to hold the CSV separated list of groups, and a list box to hold the ...

Enumerate all Delphi classes that implement a given interface?

With the new extended RTTI in Delphi 2010, can a Delphi application (at run time) build a list of all classes which implement a given interface? ...

Why should I care about RTTI in Delphi?

I've heard a lot about the new/improved RTTI capabilities of Delphi 2010, but I must admit my ignorance...I don't understand it. I know every version of Delphi has supported RTTI...and I know that RTTI (Runtime Type Information) allows me to access type information while my application is running. But what exactly does that mean? Is Del...

TExternalThread, what the heck is it? "Cannot terminate externally created thread" when terminating a thread-based timer :/

This happens half of the time when closing my application in which I have placed a TLMDHiTimer on my form in design time, Enabled set to true. In my OnFormClose event, I call MyLMDHiTimer.Enabled := false. When this is called, I sometimes (about half of the time) get this exception. I debugged and stepped into the call and found that it...

Delphi 2010 Error Insight incorrectly flags "Undeclared Identifier"

In D2010, Error Insight is incorrectly underlining in red types like "TOpenDialog" (even though my unit and project's uses both include Dialogs). Also, in my method TMyFrame.Foo, it fails the same way by flagging a reference to a VCL component in my TMyFrame -- even though Foo and the component are both part of TMyFrame. SO suggested ...

Is Delphi generic TInterfaceList possible?

In Delphi 2010, I have defined a generic TInterfaceList as follows: type TInterfaceList<I: IInterface> = class(TInterfaceList) function GetI(index: Integer): I; procedure PutI(index: Integer; const Item: I); property Items[index: Integer]: I read GetI write PutI; default; end; implementation function TInterfaceList<I>.GetI(inde...

Find all Class Helpers in Delphi at runtime using RTTI?

Does the extended RTTI in Delphi 2010 offer a way to list defined Class and Record Helpers at run time? As far as I know Delphi does not show a hint or warning when more than one class helper is defined for a class, class helper detection might be a helpful routine in 'quality assurance'. p.s. of course I know I should never ever use t...

MSBuild for Delphi 2010 creates empty Dcp directory in drive's root directory

I'm using MSBuild to build Delphi 2010 projects. It works fine. The only problem I have is that it creates 2 empty directories (Bpl and Dcp) in drive's root directory. Is there any way to prevent MSBuild from creating these directories? ...

Delphi 2010 will not show a component in the Tool Palette even though it shows installed in component package list

I have a component package that I maintain, TComPort, a sourceforge project. I recently decided to try to build the C++Builder 2010 version of the packages. Those were built and installed. Then I cleaned my system (all bpl and dcp traces of these are gone!). Now I have the odd situation where I build the runtime, and build and instal...

Delphi : Variable used in the "for In" cannot be assigned!

Why is the assignment in the for...in loop disallowed by the compiler? procedure TForm1.Button1Click(Sender: TObject); Var ars : Array [0..10] of Integer; s : Integer; ct : Integer; begin ct := 0; for s in ars do Begin s := ct; // Does not compile! Inc(ct); End; End; ...

Is the MsComm ActiveX compatible with Delphi 2010?

I have ported our project from Delphi 7 to Delphi 2010. After adding some type casts now my project is running well and all the features work correctly except main functionality of the program which is bound to COM ports and the MSCOMM ActiveX component. It can read and write from a COM port but it seems something is wrong with that bec...