GetWiegandFmt

Definition

Usage

Obtain Wiegand format of the device.

Parameter

Device number

Wiegand format

Return Value

Return True if it is successful, or return False.

Related Function

SetWiegandFmt

 

Ejemplo

C#

                        //Create Standalone SDK class dynamicly.
                    zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
            
                        //when you are using the serial port communication,you can distinguish different devices by their serial port number.
                        int iMachineNumber = 1;
                        int idwErrorCode = 0;
                        string sWiegandFmt = "";
                        if (axCZKEM1.GetWiegandFmt(iMachineNumber, ref sWiegandFmt))
                    {
                        MessageBox.Show(sWiegandFmt);
                    }
                        else
                    {
                        axCZKEM1.GetLastError(ref idwErrorCode);
                        MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
                    }
                    

VB

                        'Create Standalone SDK class dynamicly.
                        Dim axCZKEM1 As New zkemkeeper.CZKEM
                        'the serial number of the device.After connecting the device ,this value will be changed.
                        Dim iMachineNumber As Integer
                        Dim idwErrorCode As Integer
                        Dim sWiegandFmt As String = ""
                iMachineNumber = 1
                        If axCZKEM1.GetWiegandFmt(iMachineNumber, sWiegandFmt) = True Then
                    MsgBox(sWiegandFmt)
                        Else
                    axCZKEM1.GetLastError(idwErrorCode)
                    MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
                        End If