Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi dll als Ressource in Delphi7 (https://www.delphipraxis.net/69384-dll-als-ressource-delphi7.html)

schmidtf.bz 14. Mai 2006 17:42


dll als Ressource in Delphi7
 
Hi,

ich habe folgendes Problem:
möchte eine dll als Resource nutzen, aber ich habe noch
keine Ahnung wie ich diese unter Delphi7 in mein Programm
einbinden kann, um die dll wie in Visual Basic (siehe Code-
Beispiel) anzusprechen. In VB füge ich die dll als Resource
dem Projekt hinzu (ist ein Objektmodell eines Visualisierungs-
systems) und kann sie dann über RSView32.xxx ansprechen.



VB-Beispiel:

Code:
Option Explicit

Public gMyAppl As RSView32.Application
Public gMyProj As RSView32.Project
Public gAllNodes As Nodes


Private Sub Form_Load()

On Error GoTo ErrHandler

' RSView32 must be running with a project open
Set gMyAppl = New RSView32.Application
' The project object is global, and used to access the tagdb object later
Set gMyProj = gMyAppl.ActiveProject
' the nodes object is used to create / verify the node for the tags
Set gAllNodes = gMyProj.Nodes
'select a listbox item as default
lstDataTyp.ListIndex = 0
lstStrArray.ListIndex = 0
ErrHandler:
   If Err Then
       'Display the error to the user
       MsgBox Err.Description
   End If
End Sub
...
...
Bin für jede Hilfe dankbar.
Gruß
Frank

DGL-luke 14. Mai 2006 17:57

Re: dll als Ressource in Delphi7
 
Ich nehme mal an, das wird über Hier im Forum suchenCOM eingebunden. Das geht auch in Delphi, glaube ich.

schmidtf.bz 14. Mai 2006 21:09

Re: dll als Ressource in Delphi7
 
Ich denke auch das über COM gehen muss, die
Frage ist aber wie...? Habe einfach keinen
Ansatz zur Lösung des Problems.

DGL-luke 15. Mai 2006 14:40

Re: dll als Ressource in Delphi7
 
Ich glaube, du musst da eine typenbibliothek (Hier im Forum suchentypelib) einbinden. Dann kannst du auf das entsprechende Interface zugreifen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:40 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