7.3.1.1
DestroyInterface()
Description
A function pointer to the
DestoyInterface()
The function unloads the memory of an ISimulationRuntimeManager,
IRemoteRuntimeManager or IInstance interface.
Table 7- 21
Syntax
Parameters
Return values
Example C++
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
RuntimeApiEntry_DestroyInterface
is only valid if the
DestroyInterface() - Native C++
ERuntimeErrorCode DestroyInterface(
IBaseInterface* in_Interface
);
•
IBaseInterface* in_Interface:
The interface to be deleted.
Runtime error code
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
DestroyInterface
result =
instance = NULL;
function has been successfully called.
InitializeApi
Condition
The function is successful.
The pointer to the interface is
(instance);
User interfaces (API)
7.3 Shut down API
function. The function pointer
.
NULL
101