GetDeviceIP

Definition

Usage

Obtain the IP address of the device.

Parameter

Device number.

IP address.

Return Value

Return True if it is successful, or return False.

Related Function

SetDeviceIP

 

Ejemplo

C#

                                    //Create Standalone SDK class dynamicly.
                            zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
                            axCZKEM1.Connect_Net("10.0.0.43", 4370);
                                    int iMachineNumber = 1;
                                    int idwErrorCode = 0;
                                    string sIP = "";
                                    if (axCZKEM1.GetDeviceIP(iMachineNumber, ref sIP))
                            {
                                MessageBox.Show("The Device IP is: " + sIP);
                            }
                                    else
                            {
                                axCZKEM1.GetLastError(ref idwErrorCode);
                                MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
                            }
                        

VB

                                //Create Standalone SDK class dynamicly.
                                zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
                                axCZKEM1.Connect_Net("10.0.0.43", 4370);
                                int iMachineNumber = 1;
                                int idwErrorCode = 0;
                                            string sIP = "";
                                            if (axCZKEM1.GetDeviceIP(iMachineNumber, ref sIP))
                                {
                                    MessageBox.Show("The Device IP is: " + sIP);
                                }
                                            else
                                {
                                    axCZKEM1.GetLastError(ref idwErrorCode);
                                    MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
                                }