Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Einbindung einer DLL von Forticlient (https://www.delphipraxis.net/152769-einbindung-einer-dll-von-forticlient.html)

andreasm82 6. Jul 2010 09:38

Einbindung einer DLL von Forticlient
 
Hallo,

ich möchte die API Funktionen von dem Forticlient nutzen, um Verbindungen über Delphi automatisiert auf- und abbauen zu können.

Dies ist in der Doku (FortiClient EndpointSecurity ™Version 4.0 MR1Administration Guide) folgendermaßen beschrieben:

Zitat:

Linking to the COM library
The COM library for FortiClient is fccomintdll.dll, located in the FortiClient installation
directory, by default c:\Program Files\Fortinet\FortiClient. Using your development
environment, create a reference to this library.
Begin FCCOMINTDLLLibCtl.VPN VPN1
This creates VPN1 as the FortiClient object.
Depending on your development environment, you might also need a type library file. You
can find the file FCCOMIntDLL.tlb in the FortiClient .zip installation package.
Zitat:

Opening the VPN tunnel
Use the Connect method to establish the tunnel. The only parameter is the tunnel name,
as configured in the FortiClient application. In this example, the tunnel name is “Office”:
VPN1.Connect “Office”
Zitat:

Connect(bstrTunnelName As String) Open the named VPN tunnel. This connection
must already be configured in your FortiClient
application.

Disconnect(bstrTunnelName As String) Close the named VPN tunnel.

In Delphi habe ich es nun probiert, jedoch kommt beim Starten bereits die Meldung, dass der Prozeduteinstiegspunkt Connect nicht gefunden werden kann. Die DLL befindet sich übrigens im gleichen Verzeichnis wie das Projekt, sie wird also gefunden. Was tun?

Zitat:

procedure Connect(bstrTunnelName : String); stdcall; external 'FCCOMIntDLL.dll';

mkinzler 6. Jul 2010 09:42

AW: Einbindung einer DLL von Forticlient
 
Hast du die Dll registriert?

andreasm82 6. Jul 2010 10:19

AW: Einbindung einer DLL von Forticlient
 
Was bedeutet registriert?

Sorry für die Frage, hatte bisher noch nichts mit externen DLLs zu tun.

mkinzler 6. Jul 2010 10:22

AW: Einbindung einer DLL von Forticlient
 
Öffene die Konsole, wechsle in das Verzeichnis der FortClient-Installation und gebe
Code:
regsvr32 fccomintdll.dll
Ansxxhliessend würde ich versuchen die Typbibliothek in Delphi zu importieren

andreasm82 6. Jul 2010 10:51

AW: Einbindung einer DLL von Forticlient
 
Hey, geniale Idee. Danke, so funktioniert es problemlos!


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