英语翻译编程达人就不用多说了,英语达人请帮忙翻译每一个从“/*”到“ */”中间的内容/* How add your application to startup!Author:K1uSite:k0h.org & k1u.orgDisclaimer:I am not responsible for how you use this.This is p

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/06 18:50:33
英语翻译编程达人就不用多说了,英语达人请帮忙翻译每一个从“/*”到“ */”中间的内容/* How add your application to startup!Author:K1uSite:k0h.org & k1u.orgDisclaimer:I am not responsible for how you use this.This is p
xUNG~i*E& Brc,ۄue-XvW{8U%7 @HIT`bl%Y/ =3cs )j=sΞN˙{6jP[9[2)JkO+Na*OrU~vHi/sKJ֪]-2?lgq|LO]W URHQZ15$$CTdd(H70ܦTfH4pX{MFu4vänQI8>$#Y1uUuqD(h( q 2uO\'g?UyH.|p'!,a25,"gYFr ЏS{Swć*QN7AFqZF}/:<0R#1):F"âWRz$15 Pu$4kz#YX0P0C!o0vǂ4b (()o$fc\א"Kiw?B  eCd>6XcM2Uߠ ݁S:2䓀d,

英语翻译编程达人就不用多说了,英语达人请帮忙翻译每一个从“/*”到“ */”中间的内容/* How add your application to startup!Author:K1uSite:k0h.org & k1u.orgDisclaimer:I am not responsible for how you use this.This is p
英语翻译
编程达人就不用多说了,
英语达人请帮忙翻译每一个从“/*”到“ */”中间的内容
/*
How add your application to startup!
Author:K1u
Site:k0h.org & k1u.org
Disclaimer:I am not responsible for how you use this.
This is purely for educational purposes.
BTW:If you wish to use this in your application give me a shout.
*/
#include
int main(void)
{
/* Grab filename of process/exe using GetModuleFileName() function.*/
TCHAR szPath[MAX_PATH];
GetModuleFileName(NULL,
szPath,
MAX_PATH);
/* Create a New HKEY.*/
HKEY newValue;
/* Open Registry key.*/
RegOpenKey(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run",
&newValue);
/* Note use HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run to add for the
current user only.
Now give a new value.
Syntax for RegSetValueEx() function is
LONG WINAPI RegSetValueEx(
__in HKEY hKey,
__in_opt LPCTSTR lpValueName,
__reserved DWORD Reserved,
__in DWORD dwType,
__in_opt const BYTE* lpData,
__in DWORD cbData
);
RegSetValueEx(newValue,
"Name_Me_Please",
0,
REG_SZ,
(LPBYTE)szPath,
sizeof(szPath));
/* Close the key.*/
RegCloseKey(newValue);
return 0;
}

英语翻译编程达人就不用多说了,英语达人请帮忙翻译每一个从“/*”到“ */”中间的内容/* How add your application to startup!Author:K1uSite:k0h.org & k1u.orgDisclaimer:I am not responsible for how you use this.This is p
/*
How add your application to startup!
把你的程序添加到开机启动项的方法
Author:K1u
作者:K1u
Site:k0h.org & k1u.org
网站:k0h.org & k1u.org
Disclaimer:I am not responsible for how you use this.
声明:我对你怎么使用这个程序不负责
This is purely for educational purposes.
这单纯的只是教育目的
BTW:If you wish to use this in your application give me a shout.
另:如果要用在你的程序里,跟我打声招呼
*/
#include
int main(void)
{
/* Grab filename of process/exe using GetModuleFileName() function.
获取exe或进程文件名用GetModuleFileName()函数*/
TCHAR szPath[MAX_PATH];
GetModuleFileName(NULL,
szPath,
MAX_PATH);
/* Create a New HKEY.
创建一个键值*/
HKEY newValue;
/* Open Registry key.
打开注册表中的键*/
RegOpenKey(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run",
&newValue);
/* Note use HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run to add for the
注意:HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run仅对当前用户有效
current user only.
Now give a new value.
给键值赋新值
Syntax for RegSetValueEx() function is
RegSetValueEx()函数的调用方法为:
LONG WINAPI RegSetValueEx(
__in HKEY hKey,
__in_opt LPCTSTR lpValueName,
__reserved DWORD Reserved,
__in DWORD dwType,
__in_opt const BYTE* lpData,
__in DWORD cbData
);
RegSetValueEx(newValue,
"Name_Me_Please",
0,
REG_SZ,
(LPBYTE)szPath,
sizeof(szPath));
/* Close the key.
关闭该键*/
RegCloseKey(newValue);
return 0;
}