當前位置:首頁 » 編程軟體 » 注冊表編程

注冊表編程

發布時間: 2023-03-21 22:53:46

c語言修改注冊表

給你一個參考,
這個是往注冊表的開機啟動項里添加開機啟動的,(比如qq),只給你主要代碼。這個你可以網路,注冊表操作函數就那些,網路下,再看下msdn就會了》》

hkey
hkey;

tchar
childkey[256]=text("software\\microsoft\\windows\\currentversion\\run");

tchar
keyvalue[256]=text("c:\\program
files\\tencent\\qq\\bin\\qq.exe");

tchar
keyname[256]="qq";

if(error_success!=regopenkeyex(hkey_local_machine,childkey,0,key_create_sub_key,&hkey))

{

messagebox(null,text("failed
to
open
the
key
..."),text("failed!!!"),mb_ok);

}

if(error_success==regsetvalue(hkey_local_machine,childkey,reg_sz,keyvalue,strlen(keyvalue)))

{

messagebox(null,text("sucess
to
write
a
value
into
the
currentversion
.
"),text("sucess!!!"),mb_ok);

}

regclosekey(hkey);
希望對您有所幫助........

熱點內容
國外大叔解壓視頻 發布:2024-04-26 20:44:00 瀏覽:227
存儲念第幾音 發布:2024-04-26 20:33:35 瀏覽:250
衡陽dns的伺服器地址是多少 發布:2024-04-26 20:32:26 瀏覽:269
我的世界空島伺服器青金石 發布:2024-04-26 20:18:03 瀏覽:650
微信小程序演算法 發布:2024-04-26 20:03:36 瀏覽:975
易語言模板不能靜態編譯 發布:2024-04-26 19:59:02 瀏覽:353
sql注釋語句 發布:2024-04-26 19:58:48 瀏覽:654
sql存儲過程out 發布:2024-04-26 19:33:15 瀏覽:415
struts2訪問方法 發布:2024-04-26 19:11:36 瀏覽:259
外文翻譯android 發布:2024-04-26 19:03:30 瀏覽:92