qq怎么写代码

qq怎么写代码,第1张

1、编写C语言的头文件#includestdio.h。

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)

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/8247381.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-14
下一篇 2023-04-14

发表评论

登录后才能评论

评论列表(0条)

保存