커널 드라이버 (.sys)가 있는데이 드라이버를 설치하고 제어하는 데 사용할 수있는 좋은 소스가 있습니까?좋은 C++ 드라이버 설치 및 제어 코드
0
A
답변
1
을 제어하는 "SC 정지"를 "시작 SC"와 몇 년 전 NDIS 드라이버를 설치하기 위해 작성한 코드가 있습니다. 그것은 XP에서 테스트되고 사용되었지만, 그보다 더 새로운 것은 확실하지 않습니다. 다른 유형의 드라이버를 설치하려면 대부분 그룹 및 종속성을 변경해야합니다.
#define Win32_LEAN_AND_MEAN
#include <windows.h>
void install_NDIS_driver(char const *path, char const *name) {
// This uses the name as both the driver name and the display name.
SC_HANDLE manager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
SC_HANDLE service = CreateService(manager,
name, // driver name
name, // driver display name
GENERIC_EXECUTE, // allow ourselves to start the service.
SERVICE_KERNEL_DRIVER, // type of driver.
SERVICE_SYSTEM_START, // starts after boot drivers.
SERVICE_ERROR_NORMAL, // log any problems, but don't crash if it can't be loaded.
path, // path to binary file.
"NDIS", // group to which this driver belongs.
NULL,
"NDIS\0", // driver we depend upon.
NULL, // run from the default LocalSystem account.
NULL); // don't need a password for LocalSystem .
// The driver is now installed in the machine. We'll try to start it dynamically.
StartService(service, 0, NULL); // no arguments - drivers get their "stuff" from the registry.
CloseServiceHandle(service); // We're done with the service handle
CloseServiceHandle(manager); // and with the service manager.
}
+0
일부 코드가 변경되었습니다. 감사합니다. – Roman
0
Windows Service Controller을 사용하여 커널 모드 드라이버를 등록하고 제어 할 수 있습니다.
- 를 사용하여 서비스를 만들려면 .SYS 파일을 가리키는 유형 = 커널과 binPath에 "SC 작성"
- 를 사용하여 드라이버
관련 문제
- 1. 드라이버 설치 및 실행 방법
- 2. mongodb cakephp 드라이버 설치
- 3. 드라이버 설치 Cuda
- 4. 실행 파일을 사용하여 드라이버 설치
- 5. VS2008 설치 프로젝트의 자동 드라이버 설치
- 6. 오라클 드라이버 설치
- 7. Win7에서 드라이버 설치 문제가 발생했습니다.
- 8. WinUSB 드라이버 설치, 오류 0x00000003
- 9. 소프트웨어 설치 후 USB 드라이버 설치 방법
- 10. Windows에 직렬 포트 드라이버 설치
- 11. 어떻게 MongoDB를 및 C# 드라이버
- 12. Java 애플릿을 통한 드라이버 설치
- 13. C++ : 상태 및 제어 패턴
- 14. 장치 드라이버 코드 컴파일?
- 15. 드라이버/코드 서명
- 16. 지도 디바이스 드라이버 코드
- 17. 카메라 드라이버 설치 문제 - linux
- 18. Windows XP에서 드라이버 설치 자동화
- 19. MySQL 용 PDO 드라이버 설치
- 20. WiX - OS에 의존하는 드라이버 설치
- 21. 고급 설치 프로그램의 ODBC 드라이버
- 22. 프로그래밍 방식으로 NDIS 필터 드라이버 설치
- 23. C#으로 INF 파일을 사용하여 libusb 드라이버 설치
- 24. WPF C# MVC/MVP 패턴 및 사용자 제어 코드 숨김
- 25. 공식 C#을 드라이버
- 26. android : 제어 설치 프로세스
- 27. GeckoEngine 및 C# DLL로드 드라이버 문제
- 28. mongodb C 드라이버 인증
- 29. 좋은 소스 코드 브라우저 C
- 30. GridFS가있는 C# MongoDB 드라이버
어떤 시스템을 말하고 있습니까? 어쨌든이 사이트는 실제로 소스 코드를 작성하고 기존 코드를 찾는 것이 아닙니다. –
@JerryCoffin Windows, XP, Vista, 7, 8 용 드라이버 – Roman