Einzelnen Beitrag anzeigen

andreasm82

Registriert seit: 23. Nov 2009
66 Beiträge
 
#1

Einbindung einer DLL von Forticlient

  Alt 6. Jul 2010, 09:38
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';
  Mit Zitat antworten Zitat