DecodeBase64

DecodeBase64 1:

This method converts a Base64-formated string to binary data. If the conversion was successful the method returns TRUE, otherwise it returns FALSE.

Syntax

METHOD DecodeBase64 : BOOL
VAR_INPUT
  sBase64     : STRING;
  pBytes      : POINTER TO BYTE;
  nBytes      : REFERENCE TO DINT;
END_VAR
VAR_OUTPUT
  hrErrorCode : HRESULT;
END_VAR

DecodeBase64 2: Return value

Name

Type

DecodeBase64

BOOL

DecodeBase64 3: Inputs

Name

Type

sBase64

STRING

pBytes

POINTER TO BYTE

nBytes

REFERENCE TO DINT

DecodeBase64 4: Outputs

Name

Type

hrErrorCode

HRESULT

Sample call:

bSuccess := fbJson.DecodeBase64('SGVsbG8gVHdpbkNBVA==', ADR(byteArray), byteArraySize);