DLL-Version auslesen
Dieses Programm ermittelt die Version der DLL-Datei.
Download: sample01-c-ads-dll-getdllversion.zip
#include <iostream.h>
#include <conio.h>
#include <windows.h>
// Insert ADS headers
#include "C:\TwinCAT\AdsApi\TcAdsDll\Include\TcAdsDef.h"
#include "C:\TwinCAT\AdsApi\TcAdsDll\Include\TcAdsApi.h"
void main()
{
long nTemp;
AdsVersion* pDLLVersion;
nTemp = AdsGetDllVersion();
pDLLVersion = (AdsVersion *)&nTemp;
cout << "Version: " << (int)pDLLVersion->version << '\n';
cout << "Revision: " << (int)pDLLVersion->revision << '\n';
cout << "Build: " << pDLLVersion->build << '\n';
cout.flush();
getch();
}