запуск собственного драйвера ядра WIN - PullRequest
0 голосов
/ 01 апреля 2012

драйвер для первого построения, я собрал этот драйвер и получил .sys и другие файлы, но мне не удалось его запустить, я зарегистрировал его с помощью загрузчика драйверов или sc.exe, и яувидеть его в реестре, но по команде sc start я получаю сообщение об ошибке

этот драйвер заблокирован для загрузки

машина - win7 x64, но я собираю драйвер как 32-битный

снова, новичок в отношении драйверов, надеюсь, у кого-нибудь есть какое-то решение,

спасибо

РЕДАКТИРОВАТЬ:

, если я пытаюсь создать 64-битную версию, у меня есть ошибкивот так я не знаю как решить:

BUILD: Compiling and Linking c:\winddk\7600.16385.1\src\hades directory

         Configuring OACR for 'WDKSamples:amd64chk' - <OACR on>
         Compiling - hades.c
         1>errors in directory c:\winddk\7600.16385.1\src\hades
     1>c:\winddk\7600.16385.1\src\hades\hades.c(44): error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture
     1>c:\winddk\7600.16385.1\src\hades\hades.c(46): error C2065: 'push' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(46): error C2146: syntax error : missing ';' before identifier 'eax'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(47): error C2065: 'eax' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(47): error C2146: syntax error : missing ';' before identifier 'mov'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(47): error C2065: 'mov' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(47): error C2146: syntax error : missing ';' before identifier 'eax'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(47): error C2065: 'eax' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(48): error C2065: 'edx' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(48): error C2146: syntax error : missing ';' before identifier 'mov'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(48): error C2065: 'mov' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(48): error C2146: syntax error : missing ';' before identifier 'gORIG_ESP'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(50): error C2065: 'eax' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(50): error C2146: syntax error : missing ';' before identifier 'sub'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(50): error C2065: 'sub' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(50): error C2146: syntax error : missing ';' before identifier 'eax'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(50): error C2065: 'eax' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(51): error C2146: syntax error : missing ';' before identifier 'mov'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(51): error C2065: 'mov' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(51): error C2146: syntax error : missing ';' before identifier 'eax'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(51): error C2065: 'eax' : undeclared identifier
     1>c:\winddk\7600.16385.1\src\hades\hades.c(51): error C2059: syntax error : '['
     1>c:\winddk\7600.16385.1\src\hades\hades.c(96): error C2143: syntax error : missing ';' before 'type'
     1>c:\winddk\7600.16385.1\src\hades\hades.c(176): error C4013: 'hook_syscalls' undefined; assuming extern returning int
         Compiling - support.c
         Compiling - debugger.c
     1>c:\winddk\7600.16385.1\src\hades\debugger.c(52): error C2485: 'naked' : unrecognized extended attribute
     1>c:\winddk\7600.16385.1\src\hades\debugger.c(54): error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture 
... ETC

Ответы [ 2 ]

2 голосов
/ 04 апреля 2012

Первый ответ правильный для вашей первой проблемы. Ваши ошибки компиляции связаны с тем, что встроенная сборка не поддерживается для 64-разрядных сборок, вам нужно поместить свои программы на языке сборки в отдельный модуль .ASM.

2 голосов
/ 01 апреля 2012

Нельзя запускать 32-разрядные драйверы на 64-разрядных компьютерах.

Вам необходимо создать 64-разрядную версию драйвера, , подписать его сертификатом для подписи тестов и настроить на компьютере для запуска в режиме подписи тестов . Только тогда вы сможете запустить свой драйвер.

Хотя совет. Если вы не хотите страдать от частых BSOD из-за ошибок в вашем первом драйвере, рассмотрите возможность установки приложения виртуальной машины, такого как VirtualBox , и тестирования драйверов оттуда.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...