Msr.WriteTracks Method
2/27/2008
Initiates the encoding of data to the MSR track(s) selected in the TracksToWrite property.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public Overridable Sub WriteTracks ( _
track1Data As Byte(), _
track2Data As Byte(), _
track3Data As Byte(), _
track4Data As Byte(), _
timeout As Integer _
)
public virtual void WriteTracks (
byte[] track1Data,
byte[] track2Data,
byte[] track3Data,
byte[] track4Data,
int timeout
)
public:
virtual void WriteTracks (
array<unsigned char>^ track1Data,
array<unsigned char>^ track2Data,
array<unsigned char>^ track3Data,
array<unsigned char>^ track4Data,
int timeout
)
public void WriteTracks (
byte[] track1Data,
byte[] track2Data,
byte[] track3Data,
byte[] track4Data,
int timeout
)
public function WriteTracks (
track1Data : byte[],
track2Data : byte[],
track3Data : byte[],
track4Data : byte[],
timeout : int
)
Parameters
- track1Data
The first data track.
- track2Data
The second data track.
- track3Data
The third data track.
- track4Data
The fourth data track.
- timeout
The number of milliseconds before failing the method. If -1, the method waits as long as need before the card is swiped.
Remarks
When called, data is prepared to be written on to the next card that is swiped within the allotted timeout period. If no card is swiped within the timeout period then an Exception is thrown.
Data that is written to the card is read back from the card in the exact same format, the Service must not decode/encode the data in any fashion.
This method is always performed synchronously, so that the write will be attempted to the next card that is swiped.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
Msr Class
Msr Members
Microsoft.PointOfService Namespace
TracksToWrite
EncodingMaxLength