驱动学习笔记2-用程序加载NT驱动程序
NT 驱动 程序 的加载: 1:为NT 驱动 创建新的服务. 2:开启此项服务 3:关闭此项服务 4:删除NT 驱动 创建的服务 (1)打开SCM管理器 SC_HANDLE WINAPI OpenSCManager( __in LPCTSTR lpMachineName,//计算机名称.NULL或者空表示本机 __in LPCTSTR lpDatabaseName,/
NT驱动程序的加载:
1:为NT驱动创建新的服务.
2:开启此项服务
3:关闭此项服务
4:删除NT驱动创建的服务
(1)打开SCM管理器
SC_HANDLE WINAPI OpenSCManager(
__in LPCTSTR lpMachineName,//计算机名称.NULL或者空表示本机
__in LPCTSTR lpDatabaseName,//SCM数据库名称.NULL表示使用缺省数据库
__in DWORD dwDesiredAccess //使用权限.一般为SC_MANAGER_ALL_ACCESS
);
成功返回SCM管理器句柄.否则返回NULL
(2)创建服务
SC_HANDLE WINAPI CreateService(
__in SC_HANDLE hSCManager,//OpenSCManager打开的句柄
__in LPCTSTR lpServiceName,//服务名称.SCM管理器中看到的服务名称
__in LPCTSTR lpDisplayName,
__in DWORD dwDesiredAccess,//打开权限.一般为SERVICE_ALL_ACCESS
__in DWORD dwServiceType, //服务类型(文件系统驱动/普通驱动程序/驱动自加载/)
__in DWORD dwStartType, //启动类型
__in DWORD dwErrorControl, //错误控制码
__in LPCTSTR lpBinaryPathName,//服务程序或者驱动程序的路径
__in LPCTSTR lpLoadOrderGroup,//服务属于哪个用户组
__out LPDWORD lpdwTagId,
__in LPCTSTR lpDependencies, //所依赖的服务的名称
__in LPCTSTR lpServiceStartName, //用户帐户名称
__in LPCTSTR lpPassword //用户口令
);
(3)打开服务
SC_HANDLE WINAPI OpenService(
__in SC_HANDLE hSCManager, //SCM管理器句柄
__in LPCTSTR lpServiceName, //服务名称
__in DWORD dwDesiredAccess //访问权限.一般为SC_MANAGER_ALL_ACCESS
);
(4)控制服务
BOOL WINAPI ControlService(
__in SC_HANDLE hService, //服务句柄
__in DWORD dwControl, //控制码
__out LPSERVICE_STATUS lpServiceStatus //指向一个SERVICE_STATUS 结构体,来接收最后的服务信息
);
(5)关闭SCM管理器
BOOL WINAPI CloseServiceHandle(
__in SC_HANDLE hSCObject
);
完整例程

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

NVIDIA is a graphics card brand used by many users, that is, N card. However, some users found that there are Gameready and Studio when downloading the graphics card driver. Is there any difference? Let’s take a look at the detailed introduction of the difference between NVIDIA graphics card driver Gameready and Studio. Gameready is a product of NVIDIA graphics cards optimized for the gaming field, while the Studio series is aimed at professional users and optimizes the experience of using productivity software. These two series of graphics cards provide the best performance and stability for different application fields to meet users' needs for games and professional software. 2. The frequency of updates is different: gameready is updated frequently and will be released

Does Logitech ghub driver not support win7? Not compatible. Since Windows 7 has stopped updating and is no longer Microsoft's main operating system, many new software no longer supports it, such as Logitech ghub. The main interface of the Logitech driver: 1. The main software interface is on the left. The three buttons are lighting, buttons, and sensitivity settings. 2. In the settings of the lighting interface, the general special effects are relatively conventional, and the audio visual effects are the highlight. They can change color according to the sound frequency, and can be set according to the high, middle and bass bands, with different colors and effects. 3. In button settings, users can edit them here according to their special requirements. 4. In the sensitivity settings, many users will have some of their own settings. They can add the DPI speed switching point by themselves, but

This article aims to solve the "The driver cannot be loaded on this device" error message that Win11 users encounter when trying to install or update drivers. By reading this article, Win11 users will be able to solve the "The driver cannot be loaded on this device" problem, thereby ensuring the stability of the system and the normal operation of the hardware device. Program Compatibility Assistant prompts: The driver cannot be loaded on this device. Method 1: 1. Press the [Win+X] key combination, or [right-click] click [Windows Start Logo] on the taskbar, and open the hidden menu item , select [Terminal Administrator]; 2. User Account Control window, do you want to allow this application to make changes to your device? Click【

UCM-UCSIVPI is crucial to your computer because it is responsible for managing the USB Type-C port. When you encounter error messages for this driver in Device Manager, it will affect the normal working of your USB Type-C port. Therefore, it is crucial to resolve this issue promptly and this article will guide you on how to resolve the issues caused by this error message. UCM-UCSIACPI, Windows has stopped this device because it reported a problem (code 43). What is UCM—UCSIVPI device driver? Microsoft provides a driver that complies with the USB Type-C Connector System Software Interface (UCSI) specification for TPI transmission. If your system is configured
![What should I do if my Bluetooth peripheral device does not have a driver? [solved]](https://img.php.cn/upload/article/000/465/014/171033721377290.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
When many users use the Bluetooth function, an error message box pops up: The driver for the bluetooth peripheral device cannot be found, and an exclamation mark is displayed when opening the device manager. What is going on? In response to this problem, today I will share with you how to deal with the problem that the driver for the bluetooth peripheral device cannot be found. How to solve the problem that the driver cannot be found for bluetooth peripheral devices? Right-click the Bluetooth icon in the lower right corner to display Bluetooth devices. Right-click the paired Bluetooth device and click Delete Device, and the Bluetooth peripheral device will disappear. There is an uninstalled "Bluetooth Peripheral Device" in "Device Manager"

How to delete Xiaohongshu notes? Notes can be edited in the Xiaohongshu APP. Most users don’t know how to delete Xiaohongshu notes. Next, the editor brings users pictures and texts on how to delete Xiaohongshu notes. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to delete Xiaohongshu notes 1. First open the Xiaohongshu APP and enter the main page, select [Me] in the lower right corner to enter the special area; 2. Then in the My area, click on the note page shown in the picture below , select the note you want to delete; 3. Enter the note page, click [three dots] in the upper right corner; 4. Finally, the function bar will expand at the bottom, click [Delete] to complete.

Steps to download the Razer mouse driver: 1. Open the browser and enter the Razer official website; 2. On the official website page, find and click "Technical Support" or a similar option; 3. On the technical support page, select "Mouse" or the specific subcategory; 4. On the mouse driver download page, you can see various mouse models and their corresponding drivers; 5. Click the download link for the selected driver; 6. After the download is completed, check whether the downloaded file is complete , make sure nothing is damaged or missing.
