Im Grunde sehr einfach:
Delphi-Quellcode:
IMasterDeviceVersion = interface
['{DF6962EE-B638-4B59-9BE6-82B8BB369477}']
function GetAppVersion: WideString;
function GetModel: WideString;
function GetSysVersion: WideString;
procedure SetAppVersion(const Value: WideString);
procedure SetModel(const Value: WideString);
procedure SetSysVersion(const Value: WideString);
property Model: WideString read GetModel write SetModel;
property AppVersion: WideString read GetAppVersion write SetAppVersion;
property SysVersion: WideString read GetSysVersion write SetSysVersion;
end;
TMasterDeviceVersion = class(TInterfacedObject, IMasterDeviceVersion)
strict private
var
FModel: WideString;
FAppVersion: WideString;
FSysVersion: WideString;
function GetAppVersion: WideString;
function GetModel: WideString;
function GetSysVersion: WideString;
procedure SetAppVersion(const Value: WideString);
procedure SetModel(const Value: WideString);
procedure SetSysVersion(const Value: WideString);
public
property Model: WideString read GetModel write SetModel;
property AppVersion: WideString read GetAppVersion write SetAppVersion;
property SysVersion: WideString read GetSysVersion write SetSysVersion;
end;
Und dann:
Delphi-Quellcode:
procedure ParseVersion(const aText: PChar; MasterVersion: IMasterDeviceVersion); stdcall;
//
Du darfst dann natürlich auch in der Anwendung nur noch mit IMasterDeviceVersion usw. arbeiten.