1 #include <uf.h> 2 #include <uf_ui.h> 3 #include <uf_part.h> 4 #include <atlstr.h> 5 #include <iostream> 6 #include <sstream>
1 UF_initialize; 2 3 //获取当前part所在路径 4 char part_fspec[MAX_FSPEC_SIZE+1]; 5 UF_PART_ask_part_name(UF_PART_ask_display_part(), part_fspec); 6 7 //转换 8 char new_fspec[256]; 9 sprintf(new_fspec, "/select, %s", part_fspec); 10 11 //打开并选中状态 12 ShellExecute(NULL,"open","Explorer.exe",new_fspec,NULL,SW_SHOWDEFAULT); 13 14 UF_terminate();
内容转自https://www.cnblogs.com/nxopen2018/p/11253478.html