Marcelo,
Para hacer la llamada:
oZk:GetAllUserInfo( 1, @dwEnrollNumber, @Name, @Password, @Privilege, @Enabled )
como declaras dwEnrollNumber en tu PRG ?
private void GetAllUserInfo(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1)
{
//Create Standalone SDK class dynamicly.
zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
axCZKEM1.Connect_Net(sIp, iPort);
int iEnrollNumber = 0;
string sname=String.Empty ;
string sPass = String.Empty;
int iPrivilege = 0;
bool ienabled = false;
axCZKEM1.EnableDevice(iMachineNumber, false);
axCZKEM1.ReadAllUserID(iMachineNumber);//read all the user information to the memory
while (axCZKEM1.GetAllUserInfo(iMachineNumber, ref iEnrollNumber, ref sname, ref sPass, ref iPrivilege,ref ienabled))
{
MessageBox.Show("iEnrollNumber :"+iEnrollNumber.ToString()+
"sname: "+ sname+
"sPass :"+ sPass+
"iPrivilege :"+ iPrivilege+
"ienabled :"+ ienabled
);
}
axCZKEM1.EnableDevice(iMachineNumber, true);
}
#include "fivewin.ch"
function main()
local oZk, aLista := {}
local dwEnrollNumber , Name, Password, Privilege, Enabled
oZk := CreateObject("zkemkeeper.ZKEM")
oZk:SetCommPassword(12345)
oZk:Connect_Net( "10.0.0.44", 4370 )
oZk:EnableDevice(1, .F.)
oZk:ReadAllUserID(1)
dwEnrollNumber := 0
Name := ''
Password := ''
Privilege := 0
Enabled := .F.
do while oZk:GetAllUserInfo( 1, @dwEnrollNumber, @Name, @Password, @Privilege, @Enabled )
AADD( aLista, { dwEnrollNumber, Name, Password, Privilege, Enabled } )
enddo
? len( aLista )
oZk:EnableDevice(1, .T.)
xBrowse( aLista )
oZk:disconnect()
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Danielmaximiliano and 21 guests