ADS-DLL-Version auslesen
Systemvoraussetzungen:
- Borland Builder 5.0;
- TwinCAT Version 2.9 oder höher;
Dieses Programm ermittelt die Version der DLL-Datei.
Beispielprogramm 'BCB: DLL-Version auslesen'(ads-dllsample01.exe) entpacken.

Die C++ Applikation:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "AdsDllSampleUnit.h"
#include "c:\TwinCAT\ADS Api\TcAdsDll\Include\TcAdsDEF.h"
#include "c:\TwinCAT\ADS Api\TcAdsDll\Include\TcAdsAPI.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::GetVersionButtonClick(TObject *Sender)
{
long nTemp;
AdsVersion* pDLLVersion;
nTemp = AdsGetDllVersion();
pDLLVersion = (AdsVersion *)&nTemp;
Label1->Caption=Format("Version:%d, revision:%d, build:%d",
ARRAYOFCONST(((int)pDLLVersion->version, (int)pDLLVersion->revision, (int)pDLLVersion->build)));
}
//---------------------------------------------------------------------------