⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shutdown.c

📁 使用c语言编写的关机程序。希望大家多多下载
💻 C
字号:
#include <windows.h> 
#include <stdio.h>
#include <WinDef.h>
#include "ShutDown.h"

void main(int argc,char *argv[])
{
	DWORD dwTimeout; 
	if(stricmp(argv[1],"-r") == 0)
	    Closecomputer(1);
	if(stricmp(argv[1],"-s") == 0)
	    Closecomputer(2);
    if(stricmp(argv[1],"-l") == 0)
	    Closecomputer(3);
    if(stricmp(argv[1],"-h") == 0)
	   Closecomputer(4);
	if(stricmp(argv[1],"-suspend") == 0)
	   Closecomputer(5);
	if(stricmp(argv[1],"-lock") == 0)
	   Closecomputer(6);
    if(argc < 3 )
				{
					printf("input dwTimeout!");

				}
	else
	{
	dwTimeout = atoi(argv[2]);
	printf("%d\n",dwTimeout);
	if(stricmp(argv[1],"-is") == 0)
		{
			InitiateClosecomputer(1,dwTimeout);
		}
	if(stricmp(argv[1],"-ir") == 0)
		{
		
				
	        InitiateClosecomputer(2,dwTimeout);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -