Einzelnen Beitrag anzeigen

Meta777

Registriert seit: 8. Sep 2004
Ort: Magdeburg
248 Beiträge
 
Delphi 10 Seattle Enterprise
 
#1

.tlb, ActiveX-Bibliothek, "Schnittstelle nicht unterstü

  Alt 1. Mär 2006, 17:46
Hallo DPler,

Mit einer, aus einer tlb-Datei erstellten, DLL bekomme ich immer den Fehler "Schnittstelle nicht unterstützt", wenn ich das Prog auf einen Rechner ausführe wo ich die DLL NICHT erstellt habe!?! WIESO

In der Dokumentation stand folgendes zum benutzen der tlb-Datei:
Zitat:
3.2. Building an eFilm Automation client in Visual C++
1. Use the AppWizard to create a new application (SDI, MDI, dialog). Ensure that Automation is checked.
2. Open ClassWizard.
3. Click Add Class and select From Type Library.
4. Select eFilm.tlb (included in this package).
5. Instantiate IEFilm and call CreateDispatch(“efilm.document”).
6. Call the member function you want.
Ich habe mit der tlb-Datei eine DLL erzeugt indem ich in Delphi 7 folgendes tat:
1. Datei -> Neu -> Weitere -> ActiveX -> ActiveX-Bibliothek (Ist das überhaupt richtig?)
2. Projekt -> Typenbibliothek importieren -> Hinzufügen -> <.tlb-Datei ausgewählt> -> Unit anlegen (EFilm_TLB.pas erstellt)
3. Projekt -> compilieren

Und fertig ist die DLL...

Jetzt habe ich ein neues Projekt erstellt um das Ganze zu testen.
Dazu habe ich TDocument aus EFilm_TLB.pas benutzt

Delphi-Quellcode:
procedure Test;
var
  blah: TDocument;
begin
  RegisterOCX('C:\EFilm.dll');//aus der DP
  blah := TDocument.Create(nil);
  try
    blah.Connect;//HIER KOMMT "SCHNITTSTELLE NICHT UNTERSTÜTZT" WENN DAS PROG AUF EINEN RECHNER AUSGEFÜHRT WIRD WO DIE DLL NICHT ERSTELLT WURDE!
    blah.oleShowMainWindow(SW_MAXIMIZE);
    //usw...
  finally
    blah.Free;
  end;
end;

Ich hoffe ihr könnt mir helfen.

Gottes Segen
  Mit Zitat antworten Zitat