Anwenderschnittstellen (API)
7.3 API herunterfahren
7.3.1.1
DestroyInterface()
Beschreibung
Ein Funktionszeiger auf die Funktion RuntimeApiEntry_DestroyInterface. Der
Funktionszeiger DestoyInterface() wird nur gültig, wenn die Funktion InitializeApi
erfolgreich aufgerufen wurde.
Die Funktion entlädt den Speicher einer ISimulationRuntimeManager,
IRemoteRuntimeManager oder IInstance Schnittstelle.
Tabelle 7- 22 DestroyInterface() - Native C++
Syntax
Parameter
Rückgabewerte
Beispiel C++
106
ERuntimeErrorCode DestroyInterface(
IBaseInterface* in_Interface
);
•
IBaseInterface* in_Interface:
Die Schnittstelle, die gelöscht werden soll.
Runtime Fehlercode
SREC_OK
SREC_WRONG_ARGUMENT
// Include The Headerfile Of The API
#include "SimulationRuntimeApi.h"
// The Interfaces
ERuntimeErrorCode result;
ISimulationRuntimeManager* api = NULL;
IInstance* instance = NULL;
// Init the DLL and create an instance
result = InitializeApi(&api);
result = api->RegisterInstance(&instance);
// Destroy Instance Interfaces
result = DestroyInterface(instance);
instance = NULL;
Bedingung
Die Funktion ist erfolgreich.
Der Zeiger auf die Schnittstelle ist NULL.
Funktionshandbuch, 05/2021, A5E37039506-AD
S7-PLCSIM Advanced