Einzelnen Beitrag anzeigen

Benutzerbild von bernau
bernau

Registriert seit: 1. Dez 2004
Ort: Köln
1.268 Beiträge
 
Delphi 11 Alexandria
 
#1

ActiveX LongWord-parameter TypKonflikt

  Alt 23. Okt 2014, 12:56
Ich habe ein ActiveX importiert und daraus eine Unit erstellt. (Delphi2007)

Wenn ich nun auf ein Prperty vom type LongWord zugreife, erhalten ich den Fehler "TypKonflikt".

Interessant sind folgende gegebenheiten. (Auszug aus dem Quellcode)

Delphi-Quellcode:
// *********************************************************************//
// DispIntf: _DActiveT
// Flags: (4096) Dispatchable
// GUID: {1FD306A9-3B40-4211-9617-1DFF4135FCA7}
// *********************************************************************//
  _DActiveT = dispinterface
    ['{1FD306A9-3B40-4211-9617-1DFF4135FCA7}']
    function GetIPTracers: WideString; dispid 13;
    function SetData(Format: Smallint; const data: WideString): Smallint; dispid 14;
    function GetData(Format: Smallint): WideString; dispid 10;
    function Stop: Smallint; dispid 9;
    function Start: Smallint; dispid 8;
    property Port: Smallint dispid 7;
    property Rate: Integer dispid 4;
    property Parity: Smallint dispid 5;
    property FlowCtrl: Smallint dispid 6;
    property TracerTyp: Smallint dispid 1;
    property IPPort: LongWord dispid 12;
    property IPAddress: LongWord dispid 11;
    property CharLength: Smallint dispid 2;
    property StopLength: Smallint dispid 3;
  end;

  TActiveTPlus = class(TOleControl)
  private
    FOnTraceEvent: TActiveTPlusTraceEvent;
    FIntf: _DActiveT;
    function GetControlInterface: _DActiveT;
  protected
    procedure CreateControl;
    procedure InitControlData; override;
  public
    function GetIPTracers: WideString;
    function SetData(Format: Smallint; const data: WideString): Smallint;
    function GetData(Format: Smallint): WideString;
    function Stop: Smallint;
    function Start: Smallint;
    property ControlInterface: _DActiveT read GetControlInterface;
    property DefaultInterface: _DActiveT read GetControlInterface;
  published
    property Port: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
    property Rate: Integer index 4 read GetIntegerProp write SetIntegerProp stored False;
    property Parity: Smallint index 5 read GetSmallintProp write SetSmallintProp stored False;
    property FlowCtrl: Smallint index 6 read GetSmallintProp write SetSmallintProp stored False;
    property TracerTyp: Smallint index 1 read GetSmallintProp write SetSmallintProp stored False;
    property IPPort: Integer index 12 read GetIntegerProp write SetIntegerProp stored False;
    property IPAddress: Integer index 11 read GetIntegerProp write SetIntegerProp stored False;
    property CharLength: Smallint index 2 read GetSmallintProp write SetSmallintProp stored False;
    property StopLength: Smallint index 3 read GetSmallintProp write SetSmallintProp stored False;
    property OnTraceEvent: TActiveTPlusTraceEvent read FOnTraceEvent write FOnTraceEvent;
  end;
Im oberen Bereich ist das Property IPAddress vom Type LongWord und im unteren Bereich vom Type Integer. Ist es normal, daß ein ActiveX so importiert wird?
Gerd
Kölner Delphi Usergroup: http://wiki.delphitreff.de
  Mit Zitat antworten Zitat