sc 创建svchost服务_xp 创建服务_svchost应用程序错误(8)

电脑杂谈  发布时间:2017-05-07 13:43:47  来源:网络整理

504 svchost.exe Svcs: RpcSs

640 cmd.exe Title: C:\WINNT\System32\cmd.exe

1360 svchost.exe Svcs: EventSystem,Netman,RasMan,SENS,TapiSrv,IPRIPC:\>net stop iprip

The IPRIP service was stopped successfully.C:\>rundll32 svchostdll.dll,RundllUninstall iprip

DeleteService(IPRIP) SUCCESS.

7. 参考Platform SDK: Tools - Rundll32

1) Inside Win32 Services, Part 2 by: Mark Russinovich, at: ?ArticleID=8943&pg=3

2) Platform SDK: Tools - Rundll32, at: 2003/8

8. 代码

// SvcHostDLL.cpp : Demo for a service dll used by svchost.exe to host it.

//

// for detail comment see articles.

// by bingle_at_email.com.cn

//

//

/* save following as a .def file to export function, only ServiceMain is needed.

other used to install & uninstall service.

or use /EXPORT: link option to export them.EXPORTS

ServiceMain

InstallService

UninstallService

RundllUninstallA

RundllInstallA

*/

/*

To compile & link:

cl /MD /GX /LD svchostdll.cpp /link advapi32.lib /DLL /base:0x71000000 /export:ServiceMain /EXPORT:RundllUninstallA /EXPORT:RundllInstallA /EXPORT:InstallService /EXPORT:UninstallService

*///

// Articles:

// 1. HOWTO Create a service dll used by svchost.exe by bingle, at:

// 2. Inside Win32 Services, Part 2 by: Mark Russinovich, at: ?ArticleID=8943&pg=3

// 3. Platform SDK: Tools - Rundll32, at: #include <stdio.h>

#include <time.h>

#include <assert.h>

#include <windows.h>#define DEFAULT_SERVICE "IPRIP"

#define MY_EXECUTE_NAME "SvcHostDLL.exe"//main service process function


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-45730-8.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...