NX/UG二次开发—其他—UG工具调用其他开发工具

dllPath:                      被调用的dll路径

entryFunctionName: 工具的入口函数

void Function::CallOtherDll(char *dllPath, char *entryFunctionName)
{
 typedef void(*load_ufusr_f_p_t)(char *param, int *retcod, int param_len);
 load_ufusr_f_p_t call_other_dll = NULL;
 int error = UF_load_library(dllPath, entryFunctionName, (UF_load_f_p_t *)&call_other_dll);
 if (error)
 {
  char message[133];
  UF_get_fail_message(error, message);
  uc1601(message, 1);
 }
 if (call_other_dll!= NULL) call_other_dll(NULL, NULL, 0);
 UF_unload_library(dllPath);
}

发布了18 篇原创文章 · 获赞 10 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/u012077233/article/details/86715345