#include<iostream>
#include <conio.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <uf_part.h>
#include <uf_ui.h>
#include <uf.h>
#include <atlstr.h>
#include <sstream>
using namespace std;
void ufusr(char *parm, int *returnCode, int rlen)
{
UF_initialize();
char part_path[MAX_FSPEC_BUFSIZE + 1];
UF_PART_ask_part_name(UF_PART_ask_display_part(), part_path);
//反向找位置,分割字符串(只读取文件夹路径)
string strPath = part_path;
string strDir;
int nPos = strPath.find_last_of('\');
if (string::npos != nPos)
{
strDir = strPath.substr(0, nPos);
}
HWND win = (HWND)UF_UI_get_default_parent();
//修改软件标题
SetWindowTextA(win, strDir.c_str());//SetWindowTextA(句柄,你要改的标题);
UF_terminate();
}
extern int ufusr_ask_unload(void)
{
return (UF_UNLOAD_IMMEDIATELY);
}