|
代码如下:(目前测试是不成功的,想请教如果可以,需要设置哪些东西?)
int CHANGE_action_0_act_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* ---- Enter your callback code here ----- */
char * library_name = "C:\\Users\\user\\Desktop\\ceshi-dll\\c2\\c2\\x64\\Debug\\c2.dll";
char * symbol_name = "uf_test_2";
typedef int(* lpFunc)(int);
lpFunc func;
HINSTANCE hDll;
int response;
if(hDll = LoadLibrary(library_name))
{
func = (lpFunc)GetProcAddress(hDll,symbol_name);
}
if (func != NULL)
{
func(response);
UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);
FreeLibrary(hDll);
}
UF_terminate ();
/* Callback acknowledged, do not terminate dialog */
return (UF_UI_CB_CONTINUE_DIALOG);
/* or Callback acknowledged, terminate dialog. */
/* return ( UF_UI_CB_EXIT_DIALOG ); */
}
|
|