如何把一个EXE文件编译到另外一个EXE文件中? 我需要将一个可执行文件嵌入到另一个可执行文件,执行甲的时候甲调用乙,怎么做啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 首先产生乙.exe把乙做成甲的资源,在甲中最基本包括以下代码,load 资源,将资源部分写成一个乙文件,createprocess,执行刚才生成的文件 用import进资源里去需要用的时候LoadResource比如HINSTANCE hInst = AfxGetInstanceHandle(); // Load the user-defined resource. HRSRC hExeFile = ::FindResource(hInst, "STUB.EXE", "EXE_RESOURCE"); HGLOBAL hRes = ::LoadResource(hInst, hExeFile); DWORD dwSize = ::SizeofResource(hInst, hExeFile); if (hRes != NULL) { UINT FAR* lpnRes = (UINT FAR*)::LockResource(hRes); TRY { // Create the .exe file CFile file(lpszFileName, CFile::modeCreate | CFile::modeWrite); // Write the user-defined resource to the .exe file file.WriteHuge(lpnRes, dwSize); file.Flush(); } CATCH(CFileException, e) { } END_CATCH ::FreeResource(hRes); return TRUE; } return FALSE;就把那个EXE拷贝到一个临时目录中了,用EXEC执行,执行完之后删除就可以 如果仅仅是调用,个人认为没有必要这么做,发布的时候把两个exe文件一起安装 谢谢zhangnanonnet(鱼欢) ,一定要释放出来吗?能不能不释放直接在内存里执行 你可以用lpnRes坐坐文章UINT FAR* lpnRes = (UINT FAR*)::LockResource(hRes);其实已经把乙写到内存中了但是我就是没办法让他运行 http://bbs.zsu.edu.cn/bbsgcon?board=Programming&start=755 兄弟以下给出核心代码:有什么问题在回贴OK!!////////////////////////////////////////////////////////////////////////////////////创建分解文件后,运行各分解文件时的进程void CBindFileDlg::Create_Process(const char* temp_exe, BOOL async){ HANDLE hProcess; HANDLE hThread; PROCESS_INFORMATION PI; STARTUPINFO SI; memset(&SI, 0, sizeof(SI)); SI.cb = sizeof(SI); CreateProcess(temp_exe, NULL, NULL, NULL, FALSE,NORMAL_PRIORITY_CLASS, NULL, NULL, &SI, &PI); /* --- 暂不用,否则需要保存原始绑定的文件名称 //如果分解后的文件不是执行文件的话,则直接打开它 if(!CreateProcess(temp_exe, NULL, NULL, NULL, FALSE,NORMAL_PRIORITY_CLASS, NULL, NULL, &SI, &PI)) HINSTANCE result =ShellExecute(NULL, _T("open"), temp_exe, NULL,NULL, SW_SHOW); --- */ hProcess = PI.hProcess; hThread = PI.hThread; //异步执行时,执行后不删除分解后的文件;同步执行时,执行后删除分解后的文件 if (!async) //同步执行 { WaitForSingleObject(hProcess, INFINITE); unlink(temp_exe); }}//分解已合并的文件,同时运行它们void CBindFileDlg::Unbind_and_Run(){ FILE* myself; //自身文件 FILE* out; //分解后文件 int bytesin; int totalbytes = 0; char temp_exe1[] = "temp1.exe"; //分解后的绑定文件名一 char temp_exe2[] = "temp2.exe"; //分解后的绑定文件名二 int SyncFlag; //文件最终执行标志 buf = (BYTE*)malloc(modify_data.my_length); myself = fopen(my_name, "rb"); //打开最终合成文件 if (myself == NULL) { free(buf); MessageBox("分离文件中,打开自身文件时出错!","错误"); return; } out = fopen(temp_exe1, "wb"); //创建第一个绑定的文件 if (out == NULL) { free(buf); MessageBox("分离文件中,创建第一个被绑定文件时出错!","错误"); return; } //将文件指针定位到捆绑器程序长度尾部 fseek(myself, modify_data.my_length, SEEK_SET); //读取第一个绑定文件的长度 if (fread(&prog1_length, sizeof(prog1_length), 1, myself) == 0) { free(buf); MessageBox("分离文件中,读取第一个被绑定文件长度时出错!","错误"); return; } //读取最终文件执行方式(同步或异步执行) if (fread(&SyncFlag, sizeof(int), 1, myself) == 0) { free(buf); MessageBox("分离文件中,读取第一个被绑定文件长度时出错!","错误"); return; } //读取第一个文件内容并写入 while (bytesin = fread(buf, 1, sizeof(buf), myself)) { if (totalbytes + bytesin > prog1_length) bytesin = prog1_length - totalbytes; totalbytes += fwrite(buf, 1, bytesin, out); } fclose(out); //关闭第一个绑定文件句柄#ifdef DEBUG_PRINT fprintf(stderr, "已复制 %d 字节!\n", totalbytes);#endif DEBUG_PRINT totalbytes = 0; out = fopen(temp_exe2, "wb"); //创建第二个绑定的文件 if (out == NULL) { free(buf); MessageBox("分离文件中,创建第二个被绑定文件时出错!","错误"); return; } //将文件指针定位到最终合成文件中的第二个绑定文件头部, 偏移量 == //(捆绑器自身文件长度+保存第一个绑定文件长度所占字节数+保存最终文件执行标志所占字节数+第一个绑定文件长度) fseek(myself, modify_data.my_length + sizeof(modify_data.my_length) + sizeof(int) + prog1_length, SEEK_SET); //读取第二个绑定文件内容并写入 while (bytesin = fread(buf, 1, sizeof(buf), myself)) { totalbytes += fwrite(buf, 1, bytesin, out); } fclose(out); //关闭第二个绑定文件句柄#ifdef DEBUG_PRINT fprintf(stderr, "已复制 %d 字节\n", totalbytes);#endif DEBUG_PRINT fclose(myself); //关闭最终合成文件句柄 if (totalbytes == 0) { free(buf); MessageBox("分离文件中,在自身文件中没有被分离的对象!","错误"); return; } free(buf); //释放缓冲区 if(!SyncFlag) //0 -- 同步执行,1 -- 异步执行 { //置为分解后,为同步执行方式 Create_Process(temp_exe1, false); Create_Process(temp_exe2, false); } else { //置为分解后,为异步执行方式 Create_Process(temp_exe1, true); Create_Process(temp_exe2, true); }} //绑定多个文件为一个合成文件bool CBindFileDlg::Bind_Files(){ FILE* myself; //自身文件 FILE* out; //最终合成文件 FILE* in; //待绑定文件 int bytesin; int totalbytes = 0; struct _stat ST; unsigned int finder = 0x12345678; unsigned int i, k; int l=1; //状态显示 char buff[20]; //状态显示 his_name = strFirstFilePath; //第一个绑定的文件名 _stat(my_name, &ST); modify_data.my_length = ST.st_size; if (modify_data.my_length == 0) { MessageBox("绑定文件中,自身文件长度为零时出错!","错误"); return false; } buf = (BYTE *)malloc(modify_data.my_length); if (buf == NULL) { MessageBox("绑定文件中,分配自身文件长度时出错!","错误"); return false; } myself = fopen(my_name, "rb"); //打开自身文件 if (myself == NULL) { free(buf); MessageBox("绑定文件中,打开自身文件时出错!","错误"); return false; } bytesin = fread(buf, 1, modify_data.my_length, myself); fclose(myself); if (bytesin != modify_data.my_length) { free(buf); MessageBox("绑定文件中,不能完全读取自身文件内容时出错!","错误"); return false; } for (i = 0; i < modify_data.my_length - sizeof(finder); i += sizeof(finder)) { for (k = 0; k < sizeof(finder); k++) { if (buf[i+k] != ((BYTE*)&finder)[k]) break; } if (k == sizeof(finder)) //定位并保存自身数据文件大小 { memcpy(buf+ i, &modify_data, sizeof(modify_data)); break; } } if (i >= modify_data.my_length - sizeof(finder)) { free(buf); MessageBox("绑定文件中,不能定位自身文件时出错!","错误"); return false; } if (_stat(strFirstFilePath, &ST) != 0 || ST.st_size == 0) { free(buf); MessageBox("绑定文件中,读取第一个要绑定文件时出错!","错误"); return false; } list_my_icons(); out = fopen(strFinalFilePath, "wb"); //创建最终合成文件 if (out == NULL) { free(buf); MessageBox("绑定文件中,创建绑定后生成的合成文件时出错!","错误"); return false; } totalbytes += fwrite(buf, 1, bytesin, out); in = fopen(strFirstFilePath, "rb"); //打开第一个要绑定的文件 if (in == NULL) { free(buf); MessageBox("绑定文件中,打开第一个要绑定文件时出错!","错误"); return false; } //写入第一个要绑定文件的长度到合成文件中 totalbytes += fwrite(&ST.st_size, 1, sizeof(ST.st_size), out); //写入最终分解后文件执行方式的标志位(同步或异步执行) UpdateData(TRUE); //传控件值到变量m_Sync中 totalbytes += fwrite(&m_Sync, 1, sizeof(int), out); while (bytesin = fread(buf, 1, modify_data.my_length, in)) { totalbytes += fwrite(buf, 1, bytesin, out); } fclose(in); //关闭第一个绑定文件句柄 //设置进度条显示 m_Progress.SetRange(0,500); for (int m = 0; m < 500; m++) m_Progress.SetPos(m); m_Parts = _ltoa(l, buff, 10); m_Parts += _T("个文件已绑定"); UpdateData(FALSE); l++; in = fopen(strSecondFilePath, "rb"); //打开第二个要绑定的文件 if (in == NULL) { free(buf); MessageBox("绑定文件中,打开第二个要绑定文件时出错!","错误"); return false; } while (bytesin = fread(buf, 1, modify_data.my_length, in)) { totalbytes += fwrite(buf, 1, bytesin, out); } //设置进度条显示 m_Progress.SetRange(0,500); for (int n = 0; n < 500; n++) m_Progress.SetPos(n); m_Parts = _ltoa(l, buff, 10); m_Parts += _T("个文件已绑定"); UpdateData(FALSE); l++; fclose(in); //关闭第二个绑定文件句柄 fclose(out); //关闭最终合成文件句柄 free(buf); //释放缓冲区 return true;}//打开“关于”对话框void CBindFileDlg::OnButtonAbout() { CAboutDlg dlgAbout; dlgAbout.DoModal(); }//选取第一个要绑定的文件void CBindFileDlg::OnFirstBrowse() { CFileDialog fileDialog(TRUE,NULL,NULL,NULL,"可执行文件(*.exe)|*.exe|所有文件(*.*)|*.*||"); if (fileDialog.DoModal() == IDOK) { strFirstFilePath = fileDialog.GetPathName(); //保存第一个绑定文件名 m_strFirstPath = strFirstFilePath; UpdateData(FALSE); } }//选取第二个要绑定的文件void CBindFileDlg::OnSecondBrowse() { CFileDialog fileDialog(TRUE,NULL,NULL,NULL,"可执行文件(*.exe)|*.exe|所有文件(*.*)|*.*||"); if (fileDialog.DoModal() == IDOK) { strSecondFilePath = fileDialog.GetPathName(); //保存第二个绑定文件名 m_strSecondPath = strSecondFilePath; UpdateData(FALSE); } }//选择绑定后生成的合成文件名void CBindFileDlg::OnFinalBrowse() { CFileDialog fileDialog( FALSE,"*.exe",NULL,NULL,"可执行文件(*.exe)|*.exe||"); if (fileDialog.DoModal() == IDOK) { strFinalFilePath = fileDialog.GetPathName(); //保存第终合成的文件名 m_strFinalPath = strFinalFilePath; UpdateData(FALSE); } }BOOL CAboutDlg::OnInitDialog() { CDialog::OnInitDialog(); //设置“关于”对话框的位图按钮显示 m_AboutOK.LoadBitmaps(IDB_BITMAP1,5, 5, 5, 5, 4 ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}//进行绑定文件操作void CBindFileDlg::OnButtonBindFile() { if(strFirstFilePath=="" || strSecondFilePath=="" ||strFinalFilePath=="") { MessageBox("请先选择要进行绑定的文件和最终合成的目标文件名!","提示",MB_ICONINFORMATION); return; } if(Bind_Files()) //绑定文件 MessageBox("文件捆绑成功!","提示",MB_ICONINFORMATION);} 如果需要原代码我可以完全送你,留下E_Mail就可以了。不过别忘了给分哦,HOHO 如何制作一个圆角Edit控件? WriteFile与ReadComm后的数据清理问题 对话框滚动条响应鼠标滚轮 directshow错误 visual c++2003的文件可以转成visual c++6.0吗, 如何将CString类型的Edit控件设置初始光标位置? 急!!!判断消息响应函数结束的方法???谢谢 我的VC2002打开控制的设置窗口后,里面设置控件的参数一个都不见了, 是清理注册表后 小问题,急 北京、上海、武汉、深圳、湖南、西北的程序员请:).. 散分,大家帮忙想个公司名称~~ 求PhotoShop中自动色阶或自动对比度的算法!
在甲中最基本包括以下代码,load 资源,将资源部分写成一个乙文件,
createprocess,执行刚才生成的文件
需要用的时候
LoadResource比如
HINSTANCE hInst = AfxGetInstanceHandle(); // Load the user-defined resource.
HRSRC hExeFile = ::FindResource(hInst, "STUB.EXE", "EXE_RESOURCE");
HGLOBAL hRes = ::LoadResource(hInst, hExeFile);
DWORD dwSize = ::SizeofResource(hInst, hExeFile); if (hRes != NULL)
{
UINT FAR* lpnRes = (UINT FAR*)::LockResource(hRes); TRY
{
// Create the .exe file
CFile file(lpszFileName, CFile::modeCreate | CFile::modeWrite); // Write the user-defined resource to the .exe file
file.WriteHuge(lpnRes, dwSize);
file.Flush();
}
CATCH(CFileException, e)
{
}
END_CATCH
::FreeResource(hRes);
return TRUE;
}
return FALSE;就把那个EXE拷贝到一个临时目录中了,用EXEC执行,执行完之后删除就可以
其实已经把乙写到内存中了但是我就是没办法让他运行
////////////////////////////////////////////////////////////////////////////////////创建分解文件后,运行各分解文件时的进程
void CBindFileDlg::Create_Process(const char* temp_exe, BOOL async)
{
HANDLE hProcess;
HANDLE hThread;
PROCESS_INFORMATION PI;
STARTUPINFO SI; memset(&SI, 0, sizeof(SI));
SI.cb = sizeof(SI);
CreateProcess(temp_exe, NULL, NULL, NULL, FALSE,NORMAL_PRIORITY_CLASS, NULL, NULL, &SI, &PI);
/* --- 暂不用,否则需要保存原始绑定的文件名称
//如果分解后的文件不是执行文件的话,则直接打开它
if(!CreateProcess(temp_exe, NULL, NULL, NULL, FALSE,NORMAL_PRIORITY_CLASS, NULL, NULL, &SI, &PI))
HINSTANCE result =ShellExecute(NULL, _T("open"), temp_exe, NULL,NULL, SW_SHOW);
--- */ hProcess = PI.hProcess;
hThread = PI.hThread;
//异步执行时,执行后不删除分解后的文件;同步执行时,执行后删除分解后的文件
if (!async) //同步执行
{
WaitForSingleObject(hProcess, INFINITE);
unlink(temp_exe);
}
}//分解已合并的文件,同时运行它们
void CBindFileDlg::Unbind_and_Run()
{
FILE* myself; //自身文件
FILE* out; //分解后文件
int bytesin;
int totalbytes = 0;
char temp_exe1[] = "temp1.exe"; //分解后的绑定文件名一
char temp_exe2[] = "temp2.exe"; //分解后的绑定文件名二
int SyncFlag; //文件最终执行标志 buf = (BYTE*)malloc(modify_data.my_length); myself = fopen(my_name, "rb"); //打开最终合成文件
if (myself == NULL)
{
free(buf);
MessageBox("分离文件中,打开自身文件时出错!","错误");
return;
} out = fopen(temp_exe1, "wb"); //创建第一个绑定的文件
if (out == NULL)
{
free(buf);
MessageBox("分离文件中,创建第一个被绑定文件时出错!","错误");
return;
} //将文件指针定位到捆绑器程序长度尾部
fseek(myself, modify_data.my_length, SEEK_SET); //读取第一个绑定文件的长度
if (fread(&prog1_length, sizeof(prog1_length), 1, myself) == 0)
{
free(buf);
MessageBox("分离文件中,读取第一个被绑定文件长度时出错!","错误");
return;
} //读取最终文件执行方式(同步或异步执行)
if (fread(&SyncFlag, sizeof(int), 1, myself) == 0)
{
free(buf);
MessageBox("分离文件中,读取第一个被绑定文件长度时出错!","错误");
return;
}
//读取第一个文件内容并写入
while (bytesin = fread(buf, 1, sizeof(buf), myself))
{
if (totalbytes + bytesin > prog1_length)
bytesin = prog1_length - totalbytes;
totalbytes += fwrite(buf, 1, bytesin, out);
}
fclose(out); //关闭第一个绑定文件句柄#ifdef DEBUG_PRINT
fprintf(stderr, "已复制 %d 字节!\n", totalbytes);
#endif DEBUG_PRINT totalbytes = 0;
out = fopen(temp_exe2, "wb"); //创建第二个绑定的文件
if (out == NULL)
{
free(buf);
MessageBox("分离文件中,创建第二个被绑定文件时出错!","错误");
return;
} //将文件指针定位到最终合成文件中的第二个绑定文件头部, 偏移量 ==
//(捆绑器自身文件长度+保存第一个绑定文件长度所占字节数+保存最终文件执行标志所占字节数+第一个绑定文件长度)
fseek(myself, modify_data.my_length + sizeof(modify_data.my_length) + sizeof(int) + prog1_length, SEEK_SET);
//读取第二个绑定文件内容并写入
while (bytesin = fread(buf, 1, sizeof(buf), myself))
{
totalbytes += fwrite(buf, 1, bytesin, out);
}
fclose(out); //关闭第二个绑定文件句柄#ifdef DEBUG_PRINT
fprintf(stderr, "已复制 %d 字节\n", totalbytes);
#endif DEBUG_PRINT fclose(myself); //关闭最终合成文件句柄 if (totalbytes == 0)
{
free(buf);
MessageBox("分离文件中,在自身文件中没有被分离的对象!","错误");
return;
} free(buf); //释放缓冲区 if(!SyncFlag) //0 -- 同步执行,1 -- 异步执行
{
//置为分解后,为同步执行方式
Create_Process(temp_exe1, false);
Create_Process(temp_exe2, false);
}
else
{
//置为分解后,为异步执行方式
Create_Process(temp_exe1, true);
Create_Process(temp_exe2, true);
}
}
bool CBindFileDlg::Bind_Files()
{
FILE* myself; //自身文件
FILE* out; //最终合成文件
FILE* in; //待绑定文件
int bytesin;
int totalbytes = 0;
struct _stat ST;
unsigned int finder = 0x12345678;
unsigned int i, k;
int l=1; //状态显示
char buff[20]; //状态显示 his_name = strFirstFilePath; //第一个绑定的文件名 _stat(my_name, &ST);
modify_data.my_length = ST.st_size;
if (modify_data.my_length == 0)
{
MessageBox("绑定文件中,自身文件长度为零时出错!","错误");
return false;
} buf = (BYTE *)malloc(modify_data.my_length);
if (buf == NULL)
{
MessageBox("绑定文件中,分配自身文件长度时出错!","错误");
return false;
} myself = fopen(my_name, "rb"); //打开自身文件
if (myself == NULL)
{
free(buf);
MessageBox("绑定文件中,打开自身文件时出错!","错误");
return false;
} bytesin = fread(buf, 1, modify_data.my_length, myself);
fclose(myself); if (bytesin != modify_data.my_length)
{
free(buf);
MessageBox("绑定文件中,不能完全读取自身文件内容时出错!","错误");
return false;
} for (i = 0; i < modify_data.my_length - sizeof(finder); i += sizeof(finder))
{
for (k = 0; k < sizeof(finder); k++)
{
if (buf[i+k] != ((BYTE*)&finder)[k])
break;
}
if (k == sizeof(finder)) //定位并保存自身数据文件大小
{
memcpy(buf+ i, &modify_data, sizeof(modify_data));
break;
}
} if (i >= modify_data.my_length - sizeof(finder))
{
free(buf);
MessageBox("绑定文件中,不能定位自身文件时出错!","错误");
return false;
} if (_stat(strFirstFilePath, &ST) != 0 || ST.st_size == 0)
{
free(buf);
MessageBox("绑定文件中,读取第一个要绑定文件时出错!","错误");
return false;
} list_my_icons(); out = fopen(strFinalFilePath, "wb"); //创建最终合成文件
if (out == NULL)
{
free(buf);
MessageBox("绑定文件中,创建绑定后生成的合成文件时出错!","错误");
return false;
} totalbytes += fwrite(buf, 1, bytesin, out); in = fopen(strFirstFilePath, "rb"); //打开第一个要绑定的文件
if (in == NULL)
{
free(buf);
MessageBox("绑定文件中,打开第一个要绑定文件时出错!","错误");
return false;
} //写入第一个要绑定文件的长度到合成文件中
totalbytes += fwrite(&ST.st_size, 1, sizeof(ST.st_size), out); //写入最终分解后文件执行方式的标志位(同步或异步执行)
UpdateData(TRUE); //传控件值到变量m_Sync中
totalbytes += fwrite(&m_Sync, 1, sizeof(int), out); while (bytesin = fread(buf, 1, modify_data.my_length, in))
{
totalbytes += fwrite(buf, 1, bytesin, out);
}
fclose(in); //关闭第一个绑定文件句柄 //设置进度条显示
m_Progress.SetRange(0,500);
for (int m = 0; m < 500; m++)
m_Progress.SetPos(m);
m_Parts = _ltoa(l, buff, 10);
m_Parts += _T("个文件已绑定");
UpdateData(FALSE);
l++; in = fopen(strSecondFilePath, "rb"); //打开第二个要绑定的文件
if (in == NULL)
{
free(buf);
MessageBox("绑定文件中,打开第二个要绑定文件时出错!","错误");
return false;
}
while (bytesin = fread(buf, 1, modify_data.my_length, in))
{
totalbytes += fwrite(buf, 1, bytesin, out);
} //设置进度条显示
m_Progress.SetRange(0,500);
for (int n = 0; n < 500; n++)
m_Progress.SetPos(n);
m_Parts = _ltoa(l, buff, 10);
m_Parts += _T("个文件已绑定");
UpdateData(FALSE);
l++; fclose(in); //关闭第二个绑定文件句柄
fclose(out); //关闭最终合成文件句柄
free(buf); //释放缓冲区 return true;
}//打开“关于”对话框
void CBindFileDlg::OnButtonAbout()
{
CAboutDlg dlgAbout; dlgAbout.DoModal();
}//选取第一个要绑定的文件
void CBindFileDlg::OnFirstBrowse()
{
CFileDialog fileDialog(TRUE,NULL,NULL,NULL,"可执行文件(*.exe)|*.exe|所有文件(*.*)|*.*||"); if (fileDialog.DoModal() == IDOK)
{
strFirstFilePath = fileDialog.GetPathName(); //保存第一个绑定文件名
m_strFirstPath = strFirstFilePath; UpdateData(FALSE);
}
}//选取第二个要绑定的文件
void CBindFileDlg::OnSecondBrowse()
{
CFileDialog fileDialog(TRUE,NULL,NULL,NULL,"可执行文件(*.exe)|*.exe|所有文件(*.*)|*.*||"); if (fileDialog.DoModal() == IDOK)
{
strSecondFilePath = fileDialog.GetPathName(); //保存第二个绑定文件名
m_strSecondPath = strSecondFilePath; UpdateData(FALSE);
}
}//选择绑定后生成的合成文件名
void CBindFileDlg::OnFinalBrowse()
{
CFileDialog fileDialog( FALSE,"*.exe",NULL,NULL,"可执行文件(*.exe)|*.exe||");
if (fileDialog.DoModal() == IDOK)
{
strFinalFilePath = fileDialog.GetPathName(); //保存第终合成的文件名
m_strFinalPath = strFinalFilePath; UpdateData(FALSE);
}
}BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
//设置“关于”对话框的位图按钮显示
m_AboutOK.LoadBitmaps(IDB_BITMAP1,5, 5, 5, 5, 4 );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}//进行绑定文件操作
void CBindFileDlg::OnButtonBindFile()
{
if(strFirstFilePath=="" || strSecondFilePath=="" ||strFinalFilePath=="")
{
MessageBox("请先选择要进行绑定的文件和最终合成的目标文件名!","提示",MB_ICONINFORMATION);
return;
} if(Bind_Files()) //绑定文件
MessageBox("文件捆绑成功!","提示",MB_ICONINFORMATION);
}