-
2009-05-12
windows 服务程序 - [软件工程]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://xingzhesun.blogbus.com/logs/39288183.html
http://www.cnblogs.com/wuxilin/archive/2006/06/04/416838.htm
安装服务需要用到sc.exe可执行文件,它是win32Platform sdk中附带的工具.安装服务的DOS命令
sc create 服务名称 binpath= exe的路径
卸载服务的DOS命令
sc delete 服务名称
服务对话框:或在“开始”|“运行”对话框中输入 services.msc /s安装服务需要用到sc.exe可执行文件,它是win32Platform sdk中附带的工具.安装服务的DOS命令
sc create 服务名称 binpath= exe的路径
卸载服务的DOS命令
sc delete 服务名称
服务对话框:或在“开始”|“运行”对话框中输入 services.msc /s
// 启动服务的控制分派机线程
SERVICE_TABLE_ENTRY ServiceTable[2];
ServiceTable[0].lpServiceName = "MemoryStatus";
ServiceTable[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)ServiceMain;
ServiceTable[1].lpServiceName = NULL;
ServiceTable[1].lpServiceProc = NULL;//Connects the main thread of a service process to the service control manager
StartServiceCtrlDispatcher(ServiceTable);// Registers a function to handle service control requests.
RegisterServiceCtrlHandler//Updates the service control manager's status information for the calling service.
SetServiceStatus硬断点
_asm int 3;我的对象是基于“我想让这个对象做什么?”而不是“Windows 用这些 APIs 做什么?”
随机文章:
在vs2008中提供对Web Service的访问 2009-06-12Visual Studio 2008运行时提示找不到msvcr90d.dll的解决办法 2009-06-02CWindowImplBaseT的窗口例程 2009-03-15微软研究院Detour开发包之API拦截技术 2009-03-05VS2005 解决"应用程序配置不正确,程序无法启动"问题 2008-08-15
收藏到:Del.icio.us







