c语言打开.exe的函数的代码? 比如我要打开QQ软件!如何编写程序,QQ的快捷方式在桌面!
2个回答
2011-11-14
展开全部
typedef int (WINAPI ICEPUB_OPEN)(char *strPath);
ICEPUB_OPEN *icePub_open = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_open = (ICEPUB_OPEN *)GetProcAddress(hDLLDrv, "icePub_open");
}
if(icePub_open != NULL)
{
icePub_open("C:\\Program Files\\Tencent\\QQ\\Bin\\qq.exe");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
ICEPUB_OPEN *icePub_open = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_open = (ICEPUB_OPEN *)GetProcAddress(hDLLDrv, "icePub_open");
}
if(icePub_open != NULL)
{
icePub_open("C:\\Program Files\\Tencent\\QQ\\Bin\\qq.exe");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询