Generic ISO 7816-4 command for updating data in the currently selected elementary file with transparent structure.

Namespace: CardWerk.SmartCard
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Function UpdateBinary( _ 
ByVal nOffset As Integer, _ 
ByVal vbData As Byte() _ 
) As CardResponseAPDU
This language is not supported or no code example is available.
public CardResponseAPDU UpdateBinary( 
int nOffset
byte[] vbData 
)
This language is not supported or no code example is available.
public:  
CardResponseAPDU^ UpdateBinary( 
int nOffset
array< Byte >^ vbData 
)
This language is not supported or no code example is available.
public function UpdateBinary( 
nOffset : int
vbData : byte[] 
) : CardResponseAPDU;
This language is not supported or no code example is available.

Parameters

nOffset
Type: int

Byte offset where to begin updating data. The offset must be in the range from 0 through hex '7FFF'.

vbData
Type: byte[]

Data that shall be written to the file at the given offset. Must not be null and must not have a zero length or be longer than 256 bytes.

Return Value

Type: CardResponseAPDU

The complete response APDU is returned. The property CardResponseAPDU.IsSuccessful can be used to check whether the update was successful.

Exception type Condition

ArgumentOutOfRangeException

The parameter nOffset was outside the permitted range.

ArgumentNullException

The parameter vbData was null.

ArgumentException

The parameter vbData was invalid.

CardTerminalException

Thrown when a Card Terminal error condition occurs.

This method uses the following generic command APDU: CLA 'D6' HI LO LC DATA, where HI and LO are the high and low byte of the given offset, LC is the length of the given data and DATA is the given data array itself.

With some readers, this method can also be used to update data on a synchronous memory card. The UPDATE BINARY APDU sent by this method conforms to the MCT specification part 7 (IC Cards with Synchronous Transmission, Usage of Interindustry Commands) which can be downloaded from www.teletrust.de

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0