📄 loaddll.cpp
字号:
con_vmove = (LPFNDLL_con_vmove)GetProcAddress(hDLL,
"con_vmove");
con_vmove2 = (LPFNDLL_con_vmove2)GetProcAddress(hDLL,
"con_vmove2");
con_vmove3 = (LPFNDLL_con_vmove3)GetProcAddress(hDLL,
"con_vmove3");
fast_vmove = (LPFNDLL_fast_vmove)GetProcAddress(hDLL,
"fast_vmove");
fast_vmove2 = (LPFNDLL_fast_vmove2)GetProcAddress(hDLL,
"fast_vmove2");
fast_vmove3 = (LPFNDLL_fast_vmove3)GetProcAddress(hDLL,
"fast_vmove3");
con_pmove = (LPFNDLL_con_pmove)GetProcAddress(hDLL,
"con_pmove");
con_ipmove = (LPFNDLL_con_ipmove)GetProcAddress(hDLL,
"con_ipmove");
con_pmove2 = (LPFNDLL_con_pmove2)GetProcAddress(hDLL,
"con_pmove2");
con_pmove3 = (LPFNDLL_con_pmove3)GetProcAddress(hDLL,
"con_pmove3");
fast_pmove = (LPFNDLL_fast_pmove)GetProcAddress(hDLL,
"fast_pmove");
fast_pmove2 = (LPFNDLL_fast_pmove2)GetProcAddress(hDLL,
"fast_pmove2");
fast_pmove3 = (LPFNDLL_fast_pmove3)GetProcAddress(hDLL,
"fast_pmove3");
con_line2 = (LPFNDLL_con_line2)GetProcAddress(hDLL,
"con_line2");
con_line3 = (LPFNDLL_con_line3)GetProcAddress(hDLL,
"con_line3");
con_line4 = (LPFNDLL_con_line4)GetProcAddress(hDLL,
"con_line4");
fast_line2 = (LPFNDLL_fast_line2)GetProcAddress(hDLL,
"fast_line2");
fast_line3 = (LPFNDLL_fast_line3)GetProcAddress(hDLL,
"fast_line3");
fast_line4 = (LPFNDLL_fast_line4)GetProcAddress(hDLL,
"fast_line4");
arc_pmove2 = (LPFNDLL_arc_pmove2)GetProcAddress(hDLL,
"arc_pmove2");
arc_center = (LPFNDLL_arc_center)GetProcAddress(hDLL,
"arc_center");
fast_arc_center = (LPFNDLL_fast_arc_center)GetProcAddress(hDLL,
"fast_arc_center");
arc_final = (LPFNDLL_arc_final)GetProcAddress(hDLL,
"arc_final");
repeat_pmove = (LPFNDLL_repeat_pmove)GetProcAddress(hDLL,
"repeat_pmove");
helical_move = (LPFNDLL_helical_move)GetProcAddress(hDLL,
"helical_move");
start_backlash = (LPFNDLL_start_backlash)GetProcAddress(hDLL,
"start_backlash");
end_backlash = (LPFNDLL_end_backlash)GetProcAddress(hDLL,
"end_backlash");
set_backlash = (LPFNDLL_set_backlash)GetProcAddress(hDLL,
"set_backlash");
write_com = (LPFNDLL_write_com)GetProcAddress(hDLL,
"write_com");
write_3byte = (LPFNDLL_write_3byte)GetProcAddress(hDLL,
"write_3byte");
get_count = (LPFNDLL_get_count)GetProcAddress(hDLL,
"get_count");
DmcSetBatchProcessFlag = (LPFNDLL_DmcSetBatchProcessFlag)GetProcAddress(hDLL,
"DmcSetBatchProcessFlag");
DmcGetLastError = (LPFNDLL_DmcGetLastError)GetProcAddress(hDLL,
"DmcGetLastError");
DmcGetError = (LPFNDLL_DmcGetError)GetProcAddress(hDLL,
"DmcGetError");
DmcResetError = (LPFNDLL_DmcResetError)GetProcAddress(hDLL,
"DmcResetError");
set_batch_flag = (LPFNDLL_set_batch_flag)GetProcAddress(hDLL,
"set_batch_flag");
get_last_err = (LPFNDLL_get_last_err)GetProcAddress(hDLL,
"get_last_err");
get_err = (LPFNDLL_get_err)GetProcAddress(hDLL,
"get_err");
reset_err = (LPFNDLL_reset_err)GetProcAddress(hDLL,
"reset_err");
DmcSetMultCmdRampFlag = (LPFNDLL_DmcSetMultCmdRampFlag)GetProcAddress(hDLL,
"DmcSetMultCmdRampFlag");
set_ramp_flag = (LPFNDLL_set_ramp_flag)GetProcAddress(hDLL,
"set_ramp_flag");
change_vmove = (LPFNDLL_change_vmove)GetProcAddress(hDLL,
"change_vmove");
get_cur_dir = (LPFNDLL_get_cur_dir)GetProcAddress(hDLL,
"get_cur_dir");
set_abs_pos = (LPFNDLL_set_abs_pos)GetProcAddress(hDLL,
"set_abs_pos");
set_dir = (LPFNDLL_set_dir)GetProcAddress(hDLL,
"set_dir");
check_alarm = (LPFNDLL_check_alarm)GetProcAddress(hDLL,
"check_alarm");
check_SD = (LPFNDLL_check_SD)GetProcAddress(hDLL,
"check_SD");
delay_time = (LPFNDLL_delay_time)GetProcAddress(hDLL,
"delay_time");
check_delay_status = (LPFNDLL_check_delay_status)GetProcAddress(hDLL,
"check_delay_status");
Outport = (LPFNDLL_Outport)GetProcAddress(hDLL,
"Outport");
Inport = (LPFNDLL_Inport)GetProcAddress(hDLL,
"Inport");
check_home = (LPFNDLL_check_home)GetProcAddress(hDLL,
"check_home");
check_limit = (LPFNDLL_check_limit)GetProcAddress(hDLL,
"check_limit");
check_batch_done = (LPFNDLL_check_batch_done)GetProcAddress(hDLL,
"check_batch_done");
check_buffer = (LPFNDLL_check_buffer)GetProcAddress(hDLL,
"check_buffer");
set_port = (LPFNDLL_set_port)GetProcAddress(hDLL,
"set_port");
check_EncB = (LPFNDLL_check_EncB)GetProcAddress(hDLL,
"check_EncB");
check_EncZ = (LPFNDLL_check_EncZ)GetProcAddress(hDLL,
"check_EncZ");
checkin_byte = (LPFNDLL_checkin_byte)GetProcAddress(hDLL,
"checkin_byte");
checkin_bit = (LPFNDLL_checkin_bit)GetProcAddress(hDLL,
"checkin_bit");
outport_byte = (LPFNDLL_outport_byte)GetProcAddress(hDLL,
"outport_byte");
outport_bit = (LPFNDLL_outport_bit)GetProcAddress(hDLL,
"outport_bit");
set_servo_clr = (LPFNDLL_set_servo_clr)GetProcAddress(hDLL,
"set_servo_clr");
set_servo_on = (LPFNDLL_set_servo_on)GetProcAddress(hDLL,
"set_servo_on");
set_home_logic = (LPFNDLL_set_home_logic)GetProcAddress(hDLL,
"set_home_logic");
set_arc_precision = (LPFNDLL_set_arc_precision)GetProcAddress(hDLL,
"set_arc_precision");
get_cmd_counter = (LPFNDLL_get_cmd_counter)GetProcAddress(hDLL,
"get_cmd_counter");
reset_cmd_counter = (LPFNDLL_reset_cmd_counter)GetProcAddress(hDLL,
"reset_cmd_counter");
get_lib_ver = (LPFNDLL_get_lib_ver)GetProcAddress(hDLL,
"get_lib_ver");
check_IC = (LPFNDLL_check_IC)GetProcAddress(hDLL,
"check_IC");
////////////////////////////////
//若无法取得函数指针
if (!auto_set||!init_board)
{
// handle the error
FreeLibrary(hDLL);
return -1;
}
else
{
return 0;
}
}
else
{
return -1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -