Can I check the version of Indy?

I need to use the latest Indy component library. Can I get the library version using the source code command or any other trick to make sure that I am using the correct lib library. I know that I'm using indy....160.bpl is what my Delphi XE2 says when moving the mouse over the component bar. Last INDY lib I take from Fulgan Indy

+6
source share
2 answers

How to get Indy version using Indy component at runtime?

As @Remy noted in his comment, you can get the Indy version from any Indy component using the Version property. Here's a sample using the TIdHTTP component:

 procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage('Indy version: ' + IdHTTP1.Version); end; 

How to get Indy version without Indy component at runtime?

You can get the entire version string in Indy version format:

 <major>.<minor>.<release>.<build> 

from the gsIdVersion constant defined in the IdVers.inc file included in the IdGlobal.pas block, as follows:

 uses IdGlobal; procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage('Indy version: ' + gsIdVersion); end; 

or if you have revised Indy since at least October 25, 2012 (4850), you can use separate version information elements that are defined in the same include file as mentioned earlier, for example, as follows:

 uses IdGlobal; procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage('Indy version: ' + IntToStr(gsIdVersionMajor) + '.' + IntToStr(gsIdVersionMinor) + '.' + IntToStr(gsIdVersionRelease) + '.' + IntToStr(gsIdVersionBuild) ); end; 

How to get Indy version during development?

To get the Indy version at design time, you can simply right-click any of the Indy components that are reset to the form and open its About menu item About Internet Direct (Indy)...

Where is version information determined?

As I mentioned earlier, it is located in the IdVers.inc include file, which is stored in the ..\Lib\System\ library folder, and this may be the next option to get Indy version information.

Renouncement

Some of what was mentioned here refers to the latest version of Indy at the moment, but I'm not sure if it applies to all older versions (like Indy 9, for example).

+12
source

If your application already has an instance of the Indy component (which inherits from TIdBaseComponent), you can get the version simply

 Version := SomeIndyComponent.Version; 

in the current version, this function will return 10.5.9.0

+2
source

All Articles