【原创】驱动加载之StartService
BOOL WINAPI StartService(_In_ SC_HANDLE hService,_In_ DWORD dwNumServiceArgs,_In_opt_ LPCTSTR *lpServiceArgVectors);
| Return code | Description |
|---|---|
|
The handle does not have the SERVICE_START access right. |
|
The handle is invalid. |
|
The service binary file could not be found. |
|
An instance of the service is already running. |
|
The database is locked. |
|
The service depends on a service that does not exist or has been marked for deletion. |
|
The service depends on another service that has failed to start. |
|
The service has been disabled. |
|
The service did not start due to a logon failure. This error occurs if the service is configured to run under an account that does not have the "Log on as a service" right. |
|
The service has been marked for deletion. |
|
A thread could not be created for the service. |
|
The process for the service was started, but it did not call StartServiceCtrlDispatcher, or the thread that called StartServiceCtrlDispatcher may be blocked in a control handler function. |
- 当前服务的状态设为SERVICE_START_PENDING
- 接收的控制(Controls accepted)设为0
- CheckPoint变量设为0
- WaitHint时间值设为2s
(4)调用的程序能够定期地调用QueryServiceStatus函数获取服务的状态,判断新服务是否完成了初始化
本文链接:http://www.cnblogs.com/cposture/p/4717507.html
【原创】驱动加载之StartService的更多相关文章
- 老调重弹:JDBC系列之<驱动加载原理全面解析) ----转
最近在研究Mybatis框架,由于该框架基于JDBC,想要很好地理解和学习Mybatis,必须要对JDBC有较深入的了解.所以便把JDBC 这个东东翻出来,好好总结一番,作为自己的笔记,也是给读者 ...
- (DT系列四)驱动加载中, 如何取得device tree中的属性
本文以At91rm9200平台为例,从源码实现的角度来分析驱动加载时,Device tree的属性是如何取得的.一:系统级初始化DT_MACHINE_START 主要是定义"struct m ...
- 【转】(DT系列四)驱动加载中, 如何取得device tree中的属性
原文网址:http://www.cnblogs.com/biglucky/p/4057488.html 本文以At91rm9200平台为例,从源码实现的角度来分析驱动加载时,Device tree的属 ...
- linux设备和驱动加载的先后顺序
点击打开链接 Linux驱动先注册总线,总线上可以先挂device,也可以先挂driver,那么究竟怎么控制先后的顺序呢. Linux系统使用两种方式去加载系统中的模块:动态和静态. 静态加载:将所有 ...
- 如何调整Linux内核启动中的驱动初始化顺序-驱动加载优先级
Linux内核为不同驱动的加载顺序对应不同的优先级,定义了一些宏: include\linux\init.h #define pure_initcall(fn) __define_initcall(& ...
- 关于Eclipse在servlet中连接数据库时出现驱动加载失败的解决
问题:在队友发来的项目中想将他获取到的数据通过数据库储存,出现驱动加载失败问题 解决:首先百度了下相关情况,大多数都是说下载mysql-connector-java-5.1.39-bin.jar包,然 ...
- 【ESXI6.0】 ESXI6.0安装时无法安装网卡驱动的解决方法及将网卡驱动加载进ISO
http://blog.163.com/xifanliang@yeah/blog/static/115078488201571584321787/ 若安装时提示如下图所示 之后安装无法完成,会提示没有 ...
- 【原创】驱动加载之CreateService
SC_HANDLE WINAPI CreateService( _In_ SC_HANDLE hSCManager, _In_ LPCTSTR lpServiceName, _In_opt_ LPCT ...
- Windows 驱动加载程序代码
#include <windows.h> #include <winsvc.h> #include <conio.h> #include <stdio.h&g ...
随机推荐
- Spring RestTemplate get post 请求 携带 headers
RestTemplate 1.我用RestTemplate请求时 我把他注入到容器里 这样可以 什么用什么时候拿 2.也可以new出来 不过我不喜欢 所以就没有用new的 下面我自己的方法 先注 ...
- easyui属性赋值
了解easyui tree组件的童鞋估计都知道tree的node有他自己单独的属性(id,text,iconCls,checked,state,attribute,target).而原先这个几个属性想 ...
- dhcp服务简单配置
dhcp服务搭建 注意事项: > 配置虚拟机虚拟网络编辑器,取消"使用本地DHCP服务将IP地址分配给虚拟机" > 虚拟机网络连接设置为"仅主机模式" ...
- eclipse和sublime3打开freemarker(.ftl)文件
1.eclipse如何打开freemarker? https://jingyan.baidu.com/article/49ad8bce5ea95d5834d8fa9e.html 2.sublime3如 ...
- 记一下vue.js事件的修饰等问题
在事件处理程序中调用 event.preventDefault() 或 event.stopPropagation() 是非常常见的需求.尽管我们可以在 methods 中轻松实现这点,但更好的方式是 ...
- <笔记>更新某条数据库记录必须更新所有字段
今天用TP更新数据库数据时,用id得到模型对象,再通过该对象更新其他字段的数据,发现报错
- 《java从入门到精通》学习记录
目录 <Java从入门到精通>学习记录 3 基础的基础部分: 3 一. 常量与变量 3 1. 掌握: 3 (1) .常量与变量的声明方式: 3 (2) .变量的命名规则: 3 (3) .变 ...
- ubuntu16 mysql在线安装
输入"sudo apt-get update"-->回车-->"输入root用户的密码"-->回车: 输入"sudo apt-get ...
- SecureCRT使用帮助
文件上传下载 1. 安装 yum -y install lrzsz (参数-y中"y"的意思是:当安装过程提示选择全部为"yes") 2.上传 第一种方式:rz ...
- 01 of lenrning python
我也打算开始写博客啦!记录一下自己的学习过程~ 01密文登陆 这个在vscode中不显示密文 在cmd中看不到密码 # -*- coding: utf-8 -*- import getpass nam ...