delphi-2010

Why are TGeneric<Base> and TGeneric<Descendant> incompatible types?

我的梦境 提交于 2019-12-17 12:18:26
问题 I have started using of generics in Delphi 2010 but I have a problem when compiling this piece of code: TThreadBase = class( TThread ) ... end; TThreadBaseList<T: TThreadBase> = class( TObjectList<T> ) ... end; TDataProviderThread = class( TThreadBase ) ... end; TDataCore = class( TInterfacedObject, IDataCore ) private FProviders: TThreadBaseList<TDataProviderThread>; ... end; Then I have some nested procedure: procedure MakeAllThreadsActive(aThreads: TThreadBaseList<TThreadBase>); begin ...

What is the compiler version for Delphi 2010?

六眼飞鱼酱① 提交于 2019-12-17 10:33:21
问题 In Delphi 2010, if I want to do this: {$IFDEF VER999} //some delphi 2010-specific code here {$ENDIF} What version # do I need to use in place of "999"? 回答1: {$IFDEF VER210} 回答2: Here's the list of compiler versions: {$IFDEF VER40} - Turbo pascal 4 {$IFDEF VER50} - Turbo pascal 5 {$IFDEF VER55} - Turbo pascal 5.5 {$IFDEF VER60} - Turbo pascal 6 {$IFDEF VER70} - Borland pascal 7 (And turbo pascal 1.5 for windows) {$IFDEF VER80} - Delphi 1 {$IFDEF VER90} - Delphi 2 {$IFDEF VER100} - Delphi 3 {

What is the compiler version for Delphi 2010?

一笑奈何 提交于 2019-12-17 10:33:05
问题 In Delphi 2010, if I want to do this: {$IFDEF VER999} //some delphi 2010-specific code here {$ENDIF} What version # do I need to use in place of "999"? 回答1: {$IFDEF VER210} 回答2: Here's the list of compiler versions: {$IFDEF VER40} - Turbo pascal 4 {$IFDEF VER50} - Turbo pascal 5 {$IFDEF VER55} - Turbo pascal 5.5 {$IFDEF VER60} - Turbo pascal 6 {$IFDEF VER70} - Borland pascal 7 (And turbo pascal 1.5 for windows) {$IFDEF VER80} - Delphi 1 {$IFDEF VER90} - Delphi 2 {$IFDEF VER100} - Delphi 3 {

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler? [duplicate]

北城以北 提交于 2019-12-17 05:36:05
问题 This question already has answers here : How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode (4 answers) Closed 4 years ago . Possible Duplicate: How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode Since I believe that 64bit Delphi compiler will appear soon, I am curious if anybody knows what kind of programs that are now 32bit will compile and work without any changes when using 64bit compiler. And if there is a general rule what kind of changes

Screen recorder [closed]

喜欢而已 提交于 2019-12-17 02:24:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 26 days ago . I'm interested in a library(for windows) written in Delphi/Pascal or C++ that allows me to record(to a video format) desktop screen, requirements: must be able to specify the frame rate, or at least be able to record @ 5fps; must be open source or free; the output format could be almost any, but the quality must

How can I get the “Edit Component's Name” window to show when I place a component?

做~自己de王妃 提交于 2019-12-14 03:57:02
问题 I remember in Delphi 7, when you placed a component, a window would pop up allowing you to change the name of the component, like this Is there a way I can enable this in Delphi 2010? 回答1: That functionality is not built in to Delphi. It is a third-party dialog provided by CnPack, specifically their IDE Wizards (CnWizards) package. 来源: https://stackoverflow.com/questions/22073200/how-can-i-get-the-edit-components-name-window-to-show-when-i-place-a-componen

PNG image from imagelist

一曲冷凌霜 提交于 2019-12-13 16:42:25
问题 How do I take a picture from a TImageList and put it into a TImage (or return it as a TGraphic )? The important point is that a TImageList can contain 32-bpp alpha blended images. The goal is to get one of these alpha-blended images and place it in a TImage . This means at some point i would likely require a TGraphic . Although, strictly speaking, my question is about placing an image from an ImageList into an Image . If that can be accomplished without an intermedate TGraphic then that is

Delphi 2010: how do I convert a UTF8-encoded PAnsiChar to a UnicodeString?

核能气质少年 提交于 2019-12-13 16:07:20
问题 The situation: I’ve an external DLL that uses UTF-8 as its internal string format. The interface functions all use PAnsiChar to pass strings along. The rest of my application uses Delphi’s native string type; since I’m working with Delphi 2010, that will map to a UnicodeString . How can I reliably cast those PAnsiChar arguments (which are pointing to UTF-8 encoded strings) to a UnicodeString? I had this function, which I thought worked fine: function PUTF8CharToString(Text: PAnsiChar): string

Is it possible to send and receive XML to WSDL function using Delphi..?

匆匆过客 提交于 2019-12-13 14:57:14
问题 We have used Web Services with Delphi in the past and those are simple with few parameters and returned a single value to the client. A new service we working should able to XML input and receive XML output. Is there any componenet which can be used for this purpose? When i tried using like below am getting an error "Exception in SearchAgreements input parameter XmlElement - System.NullReferenceException: Object reference not set to an instance of an object." LDocument := NewXMLDocument; <

Cannot use secure SMTP connection to Office365 with Delphi 2010 and Indy 10.5.5

為{幸葍}努か 提交于 2019-12-13 14:05:13
问题 Can anyone diagnose my failure to connect to smtp.office365.com using Delphi 2010 and Indy 10.5.5? I have read the code examples provided by Indy expert Remy Lebeau in this question: Using INDY 10 SMTP with Office365. I have taken each of the two alternate code samples (one using AuthType satDefault and the other satSASL ) from that question and cut-and-pasted them into a console application. In each case get the following error when run: EIdOSSLUnderlyingCryptoError: Error connecting with