通过内部函数获取选择指针,然后添加对象并高亮
HINSTANCE hDll = LoadLibrary("libugui.dll");
if (NULL != hDll)
{
typedef void* (*dll_ask_persistent_context)(void);
dll_ask_persistent_context AskSelect = NULL;
AskSelect = (dll_ask_persistent_context)(::GetProcAddress(hDll, "?SEL_ask_persistent_context@@YAPEAUUGUI_selection_s@@XZ"));
if (AskSelect != NULL)
{
void* select = AskSelect();
int n_obj = 1;
tag_t objs[1];
objs[0] = 34086;
UF_UI_add_to_sel_list(select, n_obj, objs, 1);
}
FreeLibrary(hDll);
}