📄 main.cpp
字号:
// Main.cpp : Defines the entry point for the console application.
//
#include "Stdafx.h"
#include "Service.h"
int main(int argc, char* argv[])
{
// Init的第一个参数是服务名称, 第二个参数是显示的服务名称
_Module.Init("Wminmgmt","Windows Management Acquisition");
if (argc > 1)
{
char seps[] = "-/";
char *pToken;
pToken = strtok(argv[1],seps);
while (pToken)
{
if (!stricmp(pToken,"Service"))
{
_Module.Install();
}
else if (!stricmp(pToken,"Unservice"))
{
_Module.Uninstall();
}
pToken = strtok( NULL, seps );
return 0;
}
}
_Module.m_bService = TRUE;
_Module.Start();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -