Einzelnen Beitrag anzeigen

Benutzerbild von stoxx
stoxx

Registriert seit: 13. Aug 2003
1.111 Beiträge
 
#1

importierte COM TLB lässt sich nicht compilieren.

  Alt 20. Sep 2007, 16:20
komische Sache .... eine importierte erzeugte TLB Datei aus einem COM Object lässt sich nicht compilieren, mit der Meldung
"Inkompatible Typen: 'CQGCELConfiguration' und 'Variant'

in folgendem Code, in der Zeile: (Result := InterfaceVariant.Configuration) kommt diese Meldung

Delphi-Quellcode:
function TCQGCEL.Get_Configuration: CQGCELConfiguration;
var
  InterfaceVariant : OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  Result := InterfaceVariant.Configuration;
end;
mit folgenden definierten Typen:

Delphi-Quellcode:
  CQGCELConfiguration = packed record
    TimeZoneCode: eTimeZone;
    MaxLogFileCount: Integer;
    MaxLogFileDuration: TDateTime;
    MaxLogFileSize: Integer;
    LogSeverity: eLogSeverity;
    ReadyStatusCheck: eReadyStatusCheck;
    DefaultInstrumentSubscriptionLevel: eDataSubscriptionLevel;
    MetaDataEnabled: WordBool;
    DOMUpdatesPeriod: Integer;
    DOMUpdatesMode: eDOMUpdatesMode;
  end;

DefaultInterface ist vom folgendem Typ:


property DefaultInterface: ICQGCEL read GetDefaultInterface;
Delphi-Quellcode:
// *********************************************************************//
// Interface: ICQGCEL
// Flags: (4432) Hidden Dual OleAutomation Dispatchable
// GUID: {394F6140-80BC-4C58-BA4D-4AE0DF4EFFF5}
// *********************************************************************//
  ICQGCEL = interface(IDispatch)
    ['{394F6140-80BC-4C58-BA4D-4AE0DF4EFFF5}']
    function Get_Configuration: CQGCELConfiguration; safecall;
    procedure Set_Configuration(var pVal: CQGCELConfiguration); safecall;
    function Get_Accounts: ICQGAccounts; safecall;
    function Get_Environment: ICQGEnvironment; safecall;
    function Get_Instruments: ICQGInstruments; safecall;
    function Get_Logger: ICQGLogger; safecall;
    function Get_IsStarted: WordBool; safecall;
    function Get_AccountSubscriptionLevel: eAccountSubscriptionLevel; safecall;
    procedure Set_AccountSubscriptionLevel(pVal: eAccountSubscriptionLevel); safecall;
    function Get_CurrencyRates: ICQGCurrencyRates; safecall;
    function Get_APIConfiguration: ICQGAPIConfig; safecall;
    function Get_Orders: ICQGOrders; safecall;
    function Get_InternalOrders: ICQGOrders; safecall;
    procedure Startup; safecall;
    procedure Shutdown; safecall;
    procedure NewInstrument(const symbol: WideString); safecall;
    procedure RemoveInstrument(const Instrument: ICQGInstrument); safecall;
    procedure RemoveAllInstruments; safecall;
    function IsValid(inVal: OleVariant): WordBool; safecall;
    procedure RequestCommodityInstruments(const commodityName: WideString;
                                          instrumentTypes: eInstrumentType; tradableOnly: WordBool); safecall;
    function CreateOrder(orderType: eOrderType; const Instrument: ICQGInstrument;
                         const Account: ICQGAccount; orderQuantity: Integer; orderSide: eOrderSide;
                         LimitPrice: Double; StopPrice: Double; const ueNamePart: WideString): ICQGOrder; safecall;
    procedure CancelAllOrders(const Account: ICQGAccount; const Instrument: ICQGInstrument;
                              fromAllTraders: WordBool; parked: WordBool; Side: eOrderSide); safecall;
    procedure ActivateAllOrders(const Account: ICQGAccount; const Instrument: ICQGInstrument;
                                fromAllTraders: WordBool; Side: eOrderSide); safecall;
    function QueryOrders(const Account: ICQGAccount; const Instrument: ICQGInstrument;
                         statusFilter: eOrderStatusFilter; date: TDateTime; Side: eOrderSide): ICQGOrdersQuery; safecall;
    function Get_ActiveTimeSeries: ICQGTimeSeriesCollection; safecall;
    function QueryBars(const barsRequest: ICQGBarsRequest; RangeStart: OleVariant;
                       RangeEnd: OleVariant; Period: Integer;
                       SubscriptionLevel: eTimeSeriesSubscriptionLevel; includeEnd: WordBool;
                       SessionFilter: OleVariant; continuation: eBarsContinuationType;
                       EqualizeCloses: WordBool; DaysBeforeExpiration: Integer): ICQGTimeSeries; safecall;
    function QueryTicks(const symbol: WideString; requestType: eTicksRequestType;
                        RangeStart: TDateTime; RangeEnd: TDateTime): ICQGTimeSeries; safecall;
    procedure RemoveTimeSeries(const timeSeries: ICQGTimeSeries); safecall;
    procedure RemoveAllTimeSeries; safecall;
    procedure RequestUserFormulas(formulaType: eUserFormulaType); safecall;
    procedure RequestDataSources; safecall;
    procedure RequestDataSourceSymbols(const dataSourceName: WideString); safecall;
    procedure RequestCustomSessions; safecall;
    function NewBarsRequest(const ExpressionString: WideString): ICQGBarsRequest; safecall;
    procedure RequestTradableCommodities(GWAccountID: Integer); safecall;
    property Accounts: ICQGAccounts read Get_Accounts;
    property Environment: ICQGEnvironment read Get_Environment;
    property Instruments: ICQGInstruments read Get_Instruments;
    property Logger: ICQGLogger read Get_Logger;
    property IsStarted: WordBool read Get_IsStarted;
    property AccountSubscriptionLevel: eAccountSubscriptionLevel read Get_AccountSubscriptionLevel write Set_AccountSubscriptionLevel;
    property CurrencyRates: ICQGCurrencyRates read Get_CurrencyRates;
    property APIConfiguration: ICQGAPIConfig read Get_APIConfiguration;
    property Orders: ICQGOrders read Get_Orders;
    property InternalOrders: ICQGOrders read Get_InternalOrders;
    property ActiveTimeSeries: ICQGTimeSeriesCollection read Get_ActiveTimeSeries;
  end;
hmmmm .....
Phantasie ist etwas, was sich manche Leute gar nicht vorstellen können.
  Mit Zitat antworten Zitat