AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Was heisst Fensterhandle des OLE Elements nicht verfügbar
Thema durchsuchen
Ansicht
Themen-Optionen

Was heisst Fensterhandle des OLE Elements nicht verfügbar

Ein Thema von bundy · begonnen am 20. Nov 2006 · letzter Beitrag vom 30. Sep 2008
Antwort Antwort
Benutzerbild von bundy
bundy

Registriert seit: 24. Mai 2003
Ort: Eisenstadt
438 Beiträge
 
Delphi 2007 Architect
 
#1

Was heisst Fensterhandle des OLE Elements nicht verfügbar

  Alt 20. Nov 2006, 19:30
Ich habe eine Programm geschrieben. Das Programm funktioniert wunderbar.
Nun habe ich mir von Map & Guide die ActivX Controls gekauft.

Wenn ich eine Neue Win32 Aplication erstelle, und die Komponenten da rauf klatsche funktioniert es wunderbar.
Ziehe ich die Komponenten auf meine bestehendes Programm erhalte ich folgenden Fehler.

Im Projekt FTB_Client.exe ist eine Exception der Klasse EOleError mit der Meldung 'Das Fenster-Handle des OLE-Elements nicht verfügbar' aufgetreten.

Was bedeutet dieser Fehler ?

PS: Map&Guide sind Routenplaner Komponenten die auf ActivX basis funktionieren, ein Server läuft lokal im Hintergrund, der die Anfragen vom client verarbeitet

lg
Bundy
+++Glaube keiner Statistik, die du nicht selbst getürkthast.++++
********************
Ein anonymer Statistiker. *
********************
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#2

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 20. Nov 2006, 19:49
Wurde das Projekt mit einer alten Delphi-Version erstellt und fehlt damit der Application.Initialize-Aufruf in der dpr-Datei?
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
Benutzerbild von bundy
bundy

Registriert seit: 24. Mai 2003
Ort: Eisenstadt
438 Beiträge
 
Delphi 2007 Architect
 
#3

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 20. Nov 2006, 20:14
Nein ich hab beides mit D2006 erstellt.
+++Glaube keiner Statistik, die du nicht selbst getürkthast.++++
********************
Ein anonymer Statistiker. *
********************
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#4

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 20. Nov 2006, 20:22
Vielleicht hilft es, beim Hersteller direkt nachzufragen, vielleicht kennen die das Problem schon?
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#5

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 20. Nov 2006, 20:25
Was ist der Unterschied zwischen dem vorhanden Formular und dem neuen? Sind beide Win32-Programme? Welche weiteren Komponenten sind bereits auf der Form? Benutzt das alte Programm Laufzeitpackages?
Markus Kinzler
  Mit Zitat antworten Zitat
Benutzerbild von bundy
bundy

Registriert seit: 24. Mai 2003
Ort: Eisenstadt
438 Beiträge
 
Delphi 2007 Architect
 
#6

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 20. Nov 2006, 20:41
Das bestehende Programm hat folgende Komponenten (ohne Map&Guide Komponenten):
Delphi-Quellcode:
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
  uROClient, uROClientIntf, uRORemoteService, uROBinMessage, cxGraphics, cxPC,
  dxStatusBar, dxNavBarCollns, cxClasses, dxNavBarBase, cxSplitter, cxControls,
  ExtCtrls, dxNavBar, cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage,
  cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomView, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxGrid, cxMemo, cxDBEdit, cxDropDownEdit,
  cxCalendar, cxTextEdit, cxMaskEdit, cxSpinEdit, cxLabel, cxCheckBox,
  cxContainer, cxGroupBox, cxDBLookupComboBox, cxNavigator, cxDBNavigator,
  Menus, cxLookAndFeelPainters, cxButtons, ppBands, ppCache, ppClass, ppProd,
  ppReport, ppComm, ppRelatv, ppDB, ppDBPipe, ppCtrls, ppPrnabl, myChkBox,
  ppBarCod, jpeg, ppStrtch, ppMemo, ppVar, ImgList, cxImageComboBox;
nach Map & Guide addon
  MGC_BASELib_TLB, OleCtrls, MGC_CONTROLSLib_TLB; um das erweitert.

Neues Programm

Delphi-Quellcode:
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, MGC_BASELib_TLB, OleCtrls;

type
  TForm2 = class(TForm)
    MGCMapSource1: TMGCMapSource;
    MGCMapView1: TMGCMapView;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;
Ich hab jetzt mal beim Hersteller ins Forum gepostet, mal sehn was die antworten

lg
Bundy
+++Glaube keiner Statistik, die du nicht selbst getürkthast.++++
********************
Ein anonymer Statistiker. *
********************
  Mit Zitat antworten Zitat
Benutzerbild von bundy
bundy

Registriert seit: 24. Mai 2003
Ort: Eisenstadt
438 Beiträge
 
Delphi 2007 Architect
 
#7

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 21. Nov 2006, 17:55
Ich hab den Fehler gefunden nach langem herumprobieren.
Ich weiß zar nicht ob es jemandem interessiert, aber ich poste mal die Lösung

Delphi-Quellcode:
program FTB_DVBClient;

uses
  uROComInit, //<<<<<------------ HIER kracht es !!
  Forms,
  MidasLib,
  fClientForm in 'fClientForm.pas{ClientForm},
  fClientDataModule in 'fClientDataModule.pas{ClientDataModule: TDAClientDataModule},
  ufmSucheStrasse in 'ufmSucheStrasse.pas{fmSucheStrasse},
  ufmAnlegen in 'ufmAnlegen.pas{fmAnlegen},
  ufmExportXLS in 'ufmExportXLS.pas{fmExportXLS};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TClientDataModule, ClientDataModule);
  Application.CreateForm(TClientForm, ClientForm);
  Application.CreateForm(TfmSucheStrasse, fmSucheStrasse);
  Application.CreateForm(TfmAnlegen, fmAnlegen);
  Application.CreateForm(TfmExportXLS, fmExportXLS);
  Application.Run;
end.
uROComInit ist eine Unit von RemObjects. Die beim verwenden der Komponenten automatisch dem Projekt hinzugefügt wird.

In ihr steht folgendes.

Delphi-Quellcode:
unit uROCOMInit;

{----------------------------------------------------------------------------}
{ RemObjects SDK Library - Core Library                                      }
{                                                                            }
{ compiler: Delphi 5 and up, Kylix 2 and up                                  }
{ platform: Win32, Linux                                                     }
{                                                                            }
{ (c)opyright RemObjects Software. all rights reserved.                      }
{                                                                            }
{ Using this code requires a valid license of the RemObjects SDK             }
{ which can be obtained at [url]http://www.remobjects.com[/url].                        }
{----------------------------------------------------------------------------}

{$I RemObjects.inc}

interface

implementation

{$IFDEF MSWINDOWS}
uses ActiveX;

initialization
  CoInitializeEx(nil,COINIT_MULTITHREADED);

finalization
  CoUninitialize;
{$ENDIF}

end.
Wofür diese Unit ist, .... ich habe keine Ahnung, aber wenn ich sie aus meinem Programm entferne funktioniert es einwandfrei.
Und die Komponenten von RemObject & Dataabstract ebenfalls.

lg
Bundy
+++Glaube keiner Statistik, die du nicht selbst getürkthast.++++
********************
Ein anonymer Statistiker. *
********************
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#8

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 21. Nov 2006, 21:46
Mmmm

Diese Unit stellt die COM-Spielregeln für deine Anwendung um. Und wie es scheint ist Map & Guide nicht kompatible mit diesen COM-Threading-Modell. Damit könnte es nun sein das du beie Compos nicht in einer Exe verwenden darfst (bzw. imm umständlich das COM-Threading-Modell umstellen mußt).
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
acadam71

Registriert seit: 3. Jan 2006
8 Beiträge
 
#9

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 30. Sep 2008, 13:31
Hier mal eine Info von RemObjects bzgl. der Unit uROComInit, (der letzte Abschnitt ist der wichtigste)

Overview

Initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required.
Usage

RemObjects SDK uses MSSQL which depends on COM to work so CoInitializeEx has to be called for RO server applications to function. CoInitializeEx is used to initialize COM in a multithreaded environment. By default the templates use uROCOMInit has which calls this function, so COM is already initialized in most cases howeverusing CoInitializeEx has known disadvantages:

Clipboard stops working
Drag and drop operations can't be accepted
Object linking and embedding (OLE) doesn't work
Shell dialogs (Open/Save) don't open

All these things require OleInitialize to be called in the main thread, instead of CoInitializeEx and require Single Thread Apartment. If your application need any of the above functionality you will have to remove the uROComInit reference from your project and initialize/deinitialize COM in ever thread that requires it.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:29 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