Runtimeapientry_Destroyinterface; Table 7- 22 Runtimeapientry_Destroyinterface() - Native C - Siemens Simatic S7-1500 Function Manual

Hide thumbs Also See for Simatic S7-1500:
Table of Contents

Advertisement

User interfaces (API)
7.3 Shut down API
7.3.1.2

RuntimeApiEntry_DestroyInterface

Description
Use the
loaded from a different directory than the Startup directory of the application that calls this
function.
If the API was initialized using the
(Page 101) function.
The function unloads the memory of an ISimulationRuntimeManager,
IRemoteRuntimeManager or IInstance interface.
Table 7- 22
Syntax
Parameters
Return values
Example C++
102
RuntimeApiEntry_DestroyInterface
RuntimeApiEntry_DestroyInterface() - Native C++
__declspec(dllexport) ERuntimeErrorCode RuntimeA-
piEntry_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"
// Prepare The Variables
ERuntimeErrorCode result = SREC_INVALID_ERROR_CODE;
HMODULE dllHandle = NULL;
ApiEntry_DestroyInterface Destroy = NULL;
IInstance* instance = NULL;
// Load The DLL And Import The "DestroyInterface" Function (using
the Win32 API)
dllHandle = LoadLibraryA(DAPI_DLL_NAME_X86);
if ( dllHandle != NULL )
{
Destroy = (ApiEntry_ DestroyInterface)GetProcAddress(dllHandle,
DAPI_ENTRY_DESTROY_INTERFACE);
}
...
// Frees the memory of an IInstance interface
Destroy
result =
function only if the API library (DLL) is to be
function, you select the DestroyInterface()
InitializeApi
Condition
The function is successful.
The pointer to the interface is
(instance);
Function Manual, 12/2017, A5E37039512-AB
.
NULL
S7-PLCSIM Advanced

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents