2、编写Main函数框架。
3、定义两个变量。
4、编写输入的函数。
5、在输入后编写输出唤返程序即可。信链备滑毁
#include<windows.h>#include<stdio.h>
void main()
{
HKEY hKey
LONG iret
char path[512]
DWORD cbData
iret=RegOpenKeyEx(HKEY_LOCAL_MACHINE,"software\\tencent\\qq"橘租,NULL,KEY_QUERY_VALUE,&hKey)
if(iret != ERROR_SUCCESS)
printf("没有掘蔽安装QQ.\n")
iret=RegQueryValueEx(hKey,"判伍州install",NULL,NULL,(LPBYTE)path,&cbData)
if(iret != ERROR_SUCCESS)
printf("查询注册表失败.\n")
RegCloseKey(hKey)
lstrcat(path,"\\qq.exe")
ShellExecute(NULL,"open",path,NULL,NULL,SW_SHOWNORMAL)
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)