A ver si me podeis ayudar con este proyecto.
Estoy integrando el control de presencia con dispositivos ANVIZ a traves de la DLL (tc-b_new_sdk.dll)
La llamada a la funcion CChex_Update de esta libreria no me funciona.
la estoy realizando de la siguiente manera:
- Code: Select all Expand view RUN
public hDLL, cVersion:=0, Anviz_handle:=0, aDatos:=spac(32000), x:=0, tipo:={}
Anviz_handle:=DllCall( "tc-b_new_sdk.dll", "INT", "CChex_Start") // Esta llamada funciona bien
msginfo(Dllcall( "tc-b_new_sdk.dll", "INT", "CChex_Update",Anviz_handle,0,1,aDatos,32000))
Me devuelve -1 que es error
Este es un ejemplo de llamada en C#
- Code: Select all Expand view RUN
private void timer1_Tick(object sender, EventArgs e)
{
int ret = 0;
int[] Type = new int[1];
int[] dev_idx = new int[1];
IntPtr pBuff;
int len = 32000;
pBuff = Marshal.AllocHGlobal(len);
while (true)
{
if (anviz_handle == IntPtr.Zero)
{
break;
}
ret = AnvizNew.CChex_Update(anviz_handle, dev_idx, Type, pBuff, len);
//dbg_info("Update~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
if (ret > 0)
{
dbg_info("Msg Type : " +Type[0]);
switch (Type[0])
{
case (int)AnvizNew.MsgType.CCHEX_RET_RECORD_INFO_CARD_BYTE7_TYPE:
....
La variable MsgType
- Code: Select all Expand view RUN
public enum MsgType : int
{
CCHEX_RET_RECORD_INFO_TYPE = 1,
CCHEX_RET_DEV_LOGIN_TYPE,
CCHEX_RET_DEV_LOGOUT_TYPE,
CCHEX_RET_DLFINGERPRT_TYPE = 4,
CCHEX_RET_ULFINGERPRT_TYPE = 5,
CCHEX_RET_ULEMPLOYEE_INFO_TYPE = 6,
CCHEX_RET_ULEMPLOYEE2_INFO_TYPE = 7,
CCHEX_RET_ULEMPLOYEE2_UNICODE_INFO_TYPE = 8,
CCHEX_RET_LIST_PERSON_INFO_TYPE = 9,
CCHEX_RET_MSGGETBYIDX_INFO_TYPE = 12,
CCHEX_RET_MSGGETBYIDX_UNICODE_INFO_TYPE = 13,
CCHEX_RET_MSGADDNEW_INFO_TYPE = 14,
CCHEX_RET_MSGADDNEW_UNICODE_INFO_TYPE = 15,
CCHEX_RET_MSGDELBYIDX_INFO_TYPE = 16,
CCHEX_RET_MSGGETALLHEAD_INFO_TYPE = 17,
CCHEX_RET_REBOOT_TYPE = 18,
CCHEX_RET_DEV_STATUS_TYPE = 19,
CCHEX_RET_MSGGETALLHEADUNICODE_INFO_TYPE= 20,
CCHEX_RET_SETTIME_TYPE = 21,
CCHEX_RET_UPLOADFILE_TYPE = 22,// = 22
CCHEX_RET_GETNETCFG_TYPE = 23,
CCHEX_RET_SETNETCFG_TYPE = 24,
CCHEX_RET_GET_SN_TYPE = 25,
CCHEX_RET_SET_SN_TYPE = 26,
CCHEX_RET_DLEMPLOYEE_3_TYPE = 27, // 761
CCHEX_RET_ULEMPLOYEE_3_TYPE = 28, // 761
CCHEX_RET_GET_BASIC_CFG_TYPE = 29,
CCHEX_RET_SET_BASIC_CFG_TYPE = 30,
CCHEX_RET_DEL_PERSON_INFO_TYPE = 31,
CCHEX_RET_DEL_RECORD_OR_FLAG_INFO_TYPE = 33,
CCHEX_RET_MSGGETBYIDX_UNICODE_S_DATE_INFO_TYPE = 34,
CCHEX_RET_MSGADDNEW_UNICODE_S_DATE_INFO_TYPE = 35,
CCHEX_RET_MSGGETALLHEADUNICODE_S_DATE_INFO_TYPE = 36,
CCHEX_RET_GET_BASIC_CFG2_TYPE = 37,
CCHEX_RET_SET_BASIC_CFG2_TYPE = 38,
CCHEX_RET_GETTIME_TYPE = 39,
CCHEX_RET_INIT_USER_AREA_TYPE = 40,
CCHEX_RET_INIT_SYSTEM_TYPE = 41,
CCHEX_RET_GET_PERIOD_TIME_TYPE = 42,
CCHEX_RET_SET_PERIOD_TIME_TYPE = 43,
CCHEX_RET_GET_TEAM_INFO_TYPE = 44,
CCHEX_RET_SET_TEAM_INFO_TYPE = 45,
CCHEX_RET_ADD_FINGERPRINT_ONLINE_TYPE = 46,
CCHEX_RET_FORCED_UNLOCK_TYPE = 47,
CCHEX_RET_UDP_SEARCH_DEV_TYPE = 48,
CCHEX_RET_UDP_SET_DEV_CONFIG_TYPE = 49,
//
CCHEX_RET_GET_INFOMATION_CODE_TYPE = 50,
CCHEX_RET_SET_INFOMATION_CODE_TYPE = 51,
CCHEX_RET_GET_BELL_INFO_TYPE = 52,
CCHEX_RET_SET_BELL_INFO_TYPE = 53,
CCHEX_RET_LIVE_SEND_ATTENDANCE_TYPE = 54,
CCHEX_RET_GET_USER_ATTENDANCE_STATUS_TYPE = 55,
CCHEX_RET_SET_USER_ATTENDANCE_STATUS_TYPE = 56,
CCHEX_RET_CLEAR_ADMINISTRAT_FLAG_TYPE = 57,
CCHEX_RET_GET_SPECIAL_STATUS_TYPE = 58,
CCHEX_RET_GET_ADMIN_CARD_PWD_TYPE = 59,
CCHEX_RET_SET_ADMIN_CARD_PWD_TYPE = 60,
CCHEX_RET_GET_DST_PARAM_TYPE = 61,
CCHEX_RET_SET_DST_PARAM_TYPE = 62,
CCHEX_RET_GET_DEV_EXT_INFO_TYPE = 63,
CCHEX_RET_SET_DEV_EXT_INFO_TYPE = 64,
CCHEX_RET_GET_BASIC_CFG3_TYPE = 65,
CCHEX_RET_SET_BASIC_CFG3_TYPE = 66,
CCHEX_RET_CONNECTION_AUTHENTICATION_TYPE = 67,
CCHEX_RET_GET_RECORD_NUMBER_TYPE = 68,
CCHEX_RET_GET_RECORD_BY_EMPLOYEE_TIME_TYPE = 69,
CCHEX_RET_GET_RECORD_INFO_STATUS_TYPE = 70,
CCHEX_RET_GET_NEW_RECORD_INFO_TYPE = 71,
CCHEX_RET_ULEMPLOYEE2W2_INFO_TYPE = 72,
CCHEX_RET_GET_BASIC_CFG5_TYPE = 73,
CCHEX_RET_SET_BASIC_CFG5_TYPE = 74,
CCHEX_RET_GET_CARD_ID_TYPE = 75,
CCHEX_RET_SET_DEV_CURRENT_STATUS_TYPE = 76,
CCHEX_RET_GET_URL_TYPE = 77,
CCHEX_RET_SET_URL_TYPE = 78,
CCHEX_RET_GET_STATUS_SWITCH_TYPE = 79,
CCHEX_RET_SET_STATUS_SWITCH_TYPE = 80,
CCHEX_RET_GET_STATUS_SWITCH_EXT_TYPE = 81,
CCHEX_RET_SET_STATUS_SWITCH_EXT_TYPE = 82,
CCHEX_RET_UPDATEFILE_STATUS_TYPE = 83,
CCHEX_RET_GET_MACHINE_ID_TYPE = 84,
CCHEX_RET_SET_MACHINE_ID_TYPE = 85,
CCHEX_RET_GET_MACHINE_TYPE_TYPE = 86,
CCHEX_RET_UPLOAD_RECORD_TYPE = 87,
CCHEX_RET_GET_ONE_EMPLOYEE_INFO_TYPE = 88,
CCHEX_RET_ULEMPLOYEE_VER_4_NEWID_TYPE = 89,
CCHEX_RET_MANAGE_LOG_RECORD_TYPE = 90,
CCHEX_RET_PICTURE_GET_TOTAL_NUMBER_TYPE = 91,
CCHEX_RET_PICTURE_GET_ALL_HEAD_TYPE = 92,
CCHEX_RET_PICTURE_GET_DATA_BY_EID_TIME_TYPE = 93,
CCHEX_RET_PICTURE_DEL_DATA_BY_EID_TIME_TYPE = 94,
CCHEX_RET_LIVE_SEND_SPECIAL_STATUS_TYPE = 95,
CCHEX_RET_TM_ALL_RECORD_INFO_TYPE = 150, //CCHEX_RET_TM_RECORD_INFO_STRU
CCHEX_RET_TM_NEW_RECORD_INFO_TYPE = 151, //CCHEX_RET_TM_RECORD_INFO_STRU
CCHEX_RET_TM_LIVE_SEND_RECORD_INFO_TYPE = 152, //CCHEX_RET_TM_LIVE_SEND_RECORD_INFO_STRU
CCHEX_RET_TM_UPLOAD_RECORD_INFO_TYPE = 153, //CCHEX_RET_TM_UPLOAD_RECORD_STRU
CCHEX_RET_TM_RECORD_BY_EMPLOYEE_TIME_TYPE = 154, //CCHEX_RET_TM_RECORD_INFO_STRU
CCHEX_RET_CLINECT_CONNECT_FAIL_TYPE = 200,
CCHEX_RET_DEV_LOGIN_CHANGE_TYPE = 201,
CCHEX_RET_RECORD_INFO_CARD_BYTE7_TYPE = 251,
CCHEX_SAC_DOWNLOAD_EMPLOYEE_TYPE = 301,
CCHEX_SAC_UPLOAD_EMPLOYEE_TYPE = 302,
CCHEX_SAC_DOWNLOAD_GROUP_TYPE = 303,
CCHEX_SAC_UPLOAD_GROUP_TYPE = 304,
CCHEX_SAC_DOWNLOAD_EMPLOYEE_WITH_GROUP_TYPE = 305,
CCHEX_SAC_UPLOAD_EMPLOYEE_WITH_GROUP_TYPE = 306,
CCHEX_SAC_GET_DOOR_INFO_TYPE = 307,
CCHEX_SAC_SET_DOOR_INFO_TYPE = 308,
CCHEX_SAC_DOWNLOAD_DOOR_GROUP_TYPE = 309,
CCHEX_SAC_UPLOAD_DOOR_GROUP_TYPE = 310,
CCHEX_SAC_UPLOAD_DOOR_WITH_DOORGROUP_TYPE = 311,
CCHEX_SAC_DOWNLOAD_DOOR_WITH_DOORGROUP_TYPE = 312,
CCHEX_SAC_DOWNLOAD_TIME_FRAME_INFO_TYPE = 313,
CCHEX_SAC_UPLOAD_TIME_FRAME_INFO_TYPE = 314,
CCHEX_SAC_DOWNLOAD_TIME_FRAME_GROUP_TYPE = 315,
CCHEX_SAC_UPLOAD_TIME_FRAME_GROUP_TYPE = 316,
CCHEX_SAC_DOWNLOAD_TIME_FRAME_WITH_TIME_GROUP_TYPE = 317,
CCHEX_SAC_UPLOAD_TIME_FRAME_WITH_TIME_GROUP_TYPE = 318,
CCHEX_SAC_DOWNLOAD_ACCESS_CONTROL_GROUP_TYPE = 319,
CCHEX_SAC_UPLOAD_ACCESS_CONTROL_GROUP_TYPE = 320,
CCHEX_SAC_DOWNLOAD_COMMON_TYPE = 401,
CCHEX_SAC_UPLOAD_COMMON_TYPE = 402,
CCHEX_SAC_DELETE_COMMON_TYPE = 403,
CCHEX_SAC_INIT_COMMON_TYPE = 404,
CCHEX_SAC_PUSH_COMMON_TYPE = 405,
};
Gracias