EmptyCard

Definition

Usage

Clear the data from the MF card.

Parameter

Device number

Return Value

Return True if it is successful, or return False.

Related Function

WriteCard

 

Ejemplo

C#

private static void EmptyCard(string sIp = "10.0.0.44", int iPort = 4370)
{
    //Create Standalone SDK class dynamicly.
    zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
    axCZKEM1.Connect_Net(sIp, iPort);
    int iMachineNumber = 1;

    int idwErrorCode = 0;

    if (axCZKEM1.EmptyCard(iMachineNumber))
    {
        MessageBox.Show("EmptyCard(Mifare)! ", "Success");
    }
    else
    {
        axCZKEM1.GetLastError(ref idwErrorCode);
        MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
    }
}

VB

Private Shared Sub EmptyCard(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370)
    'Create Standalone SDK class dynamicly.
    Dim axCZKEM1 As New zkemkeeper.CZKEM
    axCZKEM1.Connect_Net(sIp, iPort)
    Dim iMachineNumber As Integer
    Dim idwErrorCode As Integer

    If axCZKEM1.EmptyCard(iMachineNumber) = True Then
        MsgBox("EmptyCard(Mifare)! ", MsgBoxStyle.Information, "Success")
    Else
        axCZKEM1.GetLastError(idwErrorCode)
        MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
    End If
End Sub