Herunterladen Diese Seite drucken

Runtimeapientry_Destroyinterface; Tabelle 7- 22 Runtimeapientry_Destroyinterface() - Native C - Siemens SIMATICS7-1500 Funktionshandbuch

12/2017

Werbung

Anwenderschnittstellen (API)
7.3 API herunterfahren
7.3.1.2

RuntimeApiEntry_DestroyInterface

Beschreibung
Nutzen Sie die Funktion
(DLL) von einem anderen Verzeichnis geladen werden soll als dem Startup-Verzeichnis der
Anwendung, die diese Funktion aufruft.
Wenn die API über die Funktion
Funktion DestroyInterface() (Seite 103).
Die Funktion entlädt den Speicher einer ISimulationRuntimeManager,
IRemoteRuntimeManager oder IInstance Schnittstelle.

Tabelle 7- 22 RuntimeApiEntry_DestroyInterface() - Native C++

Syntax
Parameter
Rückgabewerte
Beispiel C++
104
RuntimeApiEntry_DestroyInterface
InitializeApi
__declspec(dllexport) ERuntimeErrorCode RuntimeA-
piEntry_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"
// 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 =
(instance);
nur, wenn die API-Bibliothek
initialisiert wurde, dann wählen Sie die
Bedingung
Die Funktion ist erfolgreich.
Der Zeiger auf die Schnittstelle ist
Funktionshandbuch, 12/2017, A5E37039506-AB
.
NULL
S7-PLCSIM Advanced

Quicklinks ausblenden:

Werbung

loading

Diese Anleitung auch für:

Simatic s7-plcsim advanced