Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi ActiveX LongWord-parameter TypKonflikt (https://www.delphipraxis.net/182430-activex-longword-parameter-typkonflikt.html)

bernau 23. Okt 2014 12:56

ActiveX LongWord-parameter TypKonflikt
 
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?

bernau 23. Okt 2014 15:00

AW: ActiveX LongWord-parameter TypKonflikt
 
Frage zurückgezogen. Die ActiveX-Komponente war nicht registriert. Jetzt bekomme ich keinen Fehler mehr angezeigt.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:55 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz