Download ACCON-AGLink 4.0
Transcript
Programming reference additional functions 11.4 Function reference converting S7 types 11.4.1 Converting S7 string into string (AGL_S7String2String) With this function you can convert a byte buffer, which content is a S7 string, into a string. The current length is considered here. Note: Alternatively, VB programers should look for the function AGL_S7String2VBString in chapter 12 Additional functions for VB respectively VBA. C/C++-Syntax: int WINAPI AGL_S7String2String( PBYTE S7String, LPSTR Text, int MaxChars ); Visual Basic-Syntax: Declare Function AGL_S7String2String Lib "AGLink40.DLL" (ByRef S7String As Byte, ByVal Text As String, ByVal MaxChars As Long) As Long Delphi-Syntax: function AGL_S7String2String( var S7String: Byte; Text: PChar; MaxChars: Integer ): Integer; stdcall; Parameter: S7String Indicator on byte buffer in S7 string format Text Indicator on string MaxChars Number of maximum characters which has to be copied Return value: AGL40_SUCCESS If all worked properly <0 Error number (s. AGL_Defines.H, AGL_Defines.BAS or AGLink40.PAS) ACCON-AGLink 4.0 261 DELTALOGIC GmbH