- 浏览: 631125 次
- 性别:
- 来自: 西安
文章分类
最新评论
-
d1438138:
[img][/img]
google api 的一些神奇使用 -
waykingeye:
[i][b][u]引用[list]
[*][img][url] ...
No result defined for action and result input -
tss0823:
...
No result defined for action and result input -
yahier:
有什么办法能够捕捉,然后给出自定义的提示呢
No result defined for action and result input -
chen_lian:
恩恩 按照上面的代码测试一下觉得很对
java创建目录
当我们采用vs2010开发驱动时,大部分采用的都是
vs2010配置驱动 写道
Vs2010 配置驱动开发环境 1、安装VS2010,安装WDK 7.0(DDK);
2、新建VC++->Empty Project
3、打开Configuration Manager 并新建一个名称为“ dirver ”的Solution Configuration 并将“dirver” 设为Active Solution Configuration .
4、打开View-> property Manager。
5、在"dirver" solution configuration 上点击右键,选择Add new property Sheet。取名为“dirverProperty”. 并对他进下以下设置。
5.1. C\C++ - General - Debug Information Format = Program Database (/Zi)
5.2. C\C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
【WIN32;_DEBUG;_X86_;i386;STD_CALL;CONDITION_HANDLING;WIN32_LEAN_AND_MEAN;NT_UP;SRVDBG;DBG;_IDWBUILD;_WIN32_WINNT=0x0400;% (PreprocessorDefinitions)】
5.3. C\C++ - Code Generation - Enable C++ Exceptions = No
5.4. C\C++ - Code Generation - Basic Runtime Checks = Default
5.5. C\C++ - Code Generation - Buffer Security Check = No (/GS-)
5.6. C\C++ - Advanced - Calling Convention = __stdcall (/Gz)
5.7. C\C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
5.8. Linker - General - Output File = $(OutDir)\$(ProjectName).sys
5.9. Linker - General - Enable Incremental Linking = Default
5.10. Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add here needed libs here e.g. ntoskrnl.lib hal.lib]
【不知道上面是不是笔误,应该为:ntoskrnl.lib;hal.lib;%(AdditionalDependencies)】
5.11. Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
5.12. Linker - Manifest File - Generate Manifest = No
5.13. Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
5.14. Linker - System - Driver = Driver (/DRIVER)
5.15. Linker - Advanced - Entry Point = DriverEntry
5.16. Linker - Advanced - Base Address = 0x10000
5.17. Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
【这个也是错误的:应该置空】
5.18. Linker - Advanced - Data Execution Prevention (DEP) = Disable (/NXCOMPAT:NO)
【这个也是错误的:应该置空】
6. Config VC++ Directories
6.1 Open Open up property manager by clicking on Menu View->Property Manager.
6.2 Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files
for the global settings, similar to the old tools/Options/VC++ Directories.
6.3 Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page window
6.4 In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by
semicolons
(eg:Include Directories config As:
$(ddkroot)\INC
$(ddkroot)\INC\WNET
$(ddkroot)\INC\DDK\WNET
Library Directories config As:
$(ddkroot)\LIB\WNET\I386
)
6.5 Make sure to save the settings before shutting down Visual Studio.
6.6 Re-launch Visual Studio and the new settings will be in effect.
6.7 Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++
Directories”, these settings will be persisted to the project file.
七. OK. Have done. Now you can test it with simple code, e.g.:
#include "ntddk.h"
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING RegistryPath)
{
return STATUS_UNSUCCESSFUL;
}
特别说明:
1.
Visual Studio 2010 在智能设备开发方面只支持Windows Phone OS 7.0。如果你要为Windows CE 5.0和Windows Mobile 6.5开发应用程序,请安装Visual Studio 2008。
2.
做驱动开发时,SDK的版本要和WDK的版本一致,即Win7 WDK要配Win7 SDK,否则会出现编译错误。VS2010里集成了Windows SDK 7.0A。
3.
如果出现类似如下编译错误,解决方法是:拷贝C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h,然后覆盖掉C:\WinDDK\7600.16385.1\inc\api\sal.h。
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing ')' before 'const'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing '{' before 'const'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(56): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(56): error C2085: '_ExceptionRecord' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(57): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(57): error C2085: '_EstablisherFrame' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2085: '_Inout_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2085: '_ContextRecord' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(59): error C2085: '_Inout_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(59): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(60): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(60): error C2085: '_DispatcherContext' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(104): error C2082: redefinition of formal parameter '_exception_code'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(105): error C2082: redefinition of formal parameter '_exception_info'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(106): error C2082: redefinition of formal parameter '_abnormal_termination'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(92): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_isctype_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_In_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_Type' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(94): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_isalpha_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(96): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_isupper_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_islower_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(100): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_isdigit_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(102): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_isxdigit_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(104): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_isspace_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(106): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): fatal error C1003: error count exceeds 100; stopping compilation
2、新建VC++->Empty Project
3、打开Configuration Manager 并新建一个名称为“ dirver ”的Solution Configuration 并将“dirver” 设为Active Solution Configuration .
4、打开View-> property Manager。
5、在"dirver" solution configuration 上点击右键,选择Add new property Sheet。取名为“dirverProperty”. 并对他进下以下设置。
5.1. C\C++ - General - Debug Information Format = Program Database (/Zi)
5.2. C\C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
【WIN32;_DEBUG;_X86_;i386;STD_CALL;CONDITION_HANDLING;WIN32_LEAN_AND_MEAN;NT_UP;SRVDBG;DBG;_IDWBUILD;_WIN32_WINNT=0x0400;% (PreprocessorDefinitions)】
5.3. C\C++ - Code Generation - Enable C++ Exceptions = No
5.4. C\C++ - Code Generation - Basic Runtime Checks = Default
5.5. C\C++ - Code Generation - Buffer Security Check = No (/GS-)
5.6. C\C++ - Advanced - Calling Convention = __stdcall (/Gz)
5.7. C\C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
5.8. Linker - General - Output File = $(OutDir)\$(ProjectName).sys
5.9. Linker - General - Enable Incremental Linking = Default
5.10. Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add here needed libs here e.g. ntoskrnl.lib hal.lib]
【不知道上面是不是笔误,应该为:ntoskrnl.lib;hal.lib;%(AdditionalDependencies)】
5.11. Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
5.12. Linker - Manifest File - Generate Manifest = No
5.13. Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
5.14. Linker - System - Driver = Driver (/DRIVER)
5.15. Linker - Advanced - Entry Point = DriverEntry
5.16. Linker - Advanced - Base Address = 0x10000
5.17. Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
【这个也是错误的:应该置空】
5.18. Linker - Advanced - Data Execution Prevention (DEP) = Disable (/NXCOMPAT:NO)
【这个也是错误的:应该置空】
6. Config VC++ Directories
6.1 Open Open up property manager by clicking on Menu View->Property Manager.
6.2 Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files
for the global settings, similar to the old tools/Options/VC++ Directories.
6.3 Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page window
6.4 In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by
semicolons
(eg:Include Directories config As:
$(ddkroot)\INC
$(ddkroot)\INC\WNET
$(ddkroot)\INC\DDK\WNET
Library Directories config As:
$(ddkroot)\LIB\WNET\I386
)
6.5 Make sure to save the settings before shutting down Visual Studio.
6.6 Re-launch Visual Studio and the new settings will be in effect.
6.7 Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++
Directories”, these settings will be persisted to the project file.
七. OK. Have done. Now you can test it with simple code, e.g.:
#include "ntddk.h"
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING RegistryPath)
{
return STATUS_UNSUCCESSFUL;
}
特别说明:
1.
Visual Studio 2010 在智能设备开发方面只支持Windows Phone OS 7.0。如果你要为Windows CE 5.0和Windows Mobile 6.5开发应用程序,请安装Visual Studio 2008。
2.
做驱动开发时,SDK的版本要和WDK的版本一致,即Win7 WDK要配Win7 SDK,否则会出现编译错误。VS2010里集成了Windows SDK 7.0A。
3.
如果出现类似如下编译错误,解决方法是:拷贝C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h,然后覆盖掉C:\WinDDK\7600.16385.1\inc\api\sal.h。
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing ')' before 'const'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing '{' before 'const'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(56): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(56): error C2085: '_ExceptionRecord' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(57): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(57): error C2085: '_EstablisherFrame' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2085: '_Inout_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(58): error C2085: '_ContextRecord' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(59): error C2085: '_Inout_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(59): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(60): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(60): error C2085: '_DispatcherContext' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(104): error C2082: redefinition of formal parameter '_exception_code'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(105): error C2082: redefinition of formal parameter '_exception_info'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\excpt.h(106): error C2082: redefinition of formal parameter '_abnormal_termination'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(92): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_isctype_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_In_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_Type' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(94): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_isalpha_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(96): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_isupper_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_islower_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(100): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_isdigit_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(102): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_isxdigit_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(104): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_isspace_l' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_C' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2085: '_In_opt_' : not in formal parameter list
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2146: syntax error : missing ',' before identifier '_locale_t'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2146: syntax error : missing ',' before identifier '_Locale'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(106): error C2061: syntax error : identifier '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2086: 'int _Check_return_' : redefinition
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(93) : see declaration of '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2054: expected '(' to follow '_Check_return_'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2143: syntax error : missing ')' before 'type'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): fatal error C1003: error count exceeds 100; stopping compilation
但是这样配置的在运行helloworld时基本上不会报错,但是一旦往后面写,比如说在某个程序中调用ObDereferenceObject,
就会发现error LNK2019: 无法解析的外部符号 _ObfDereferenceObject@4,该符号在函数 _ccpOpenCom@8 中被引用
这时解决方案是
写道
最后发现我配置的vs2010中c/c++中预处理器定义里面的
就是5.2. C\C++ - Preprocessor - Preprocessor Definitions
_WIN32_WINNT=0x0400这句有问题,删掉_WIN32_WINNT=0x0400这句,再次编译连接就生成成功了,所以说网上给的那个vs2010配置驱动好像有点问题,
目前进展就到这里,
详细的内容可以参见我在看雪上和人讨论的内容
http://bbs.pediy.com/showthread.php?p=837648#post837648
相关推荐
### WIN7 VS2010 WDK7.60 配置驱动开发环境知识点详解 #### 一、概述 在Windows环境下进行驱动程序开发时,通常需要借助Microsoft提供的工具链来构建开发环境。本篇文章主要介绍了如何在Windows 7操作系统上使用...
这些建议和解决方案是为了帮助新手开发者避免常见的错误,快速入门驱动开发。同时,本文也提到了驱动程序开发的一些基本原则,比如驱动程序不具有兼容性,即x86和x64架构下的驱动程序不能相互替换使用。由于x86架构...
在IT行业的驱动开发领域,尤其是针对Windows操作系统的设备驱动开发,使用Visual Studio 2005(简称VS2005)进行环境配置是一项基础但关键的技能。传统的驱动开发通常依赖于Microsoft提供的DDK(Driver Development ...
本文将详细介绍如何配置一个基于VS2008和DDK的驱动开发环境。 首先,你需要安装Microsoft Visual Studio 2008。这个版本的VS包含了C++编译器和其他必要的工具,用于编写和构建驱动代码。在安装过程中,确保选择...
### 驱动开发环境搭建(VS2010+WDK 7.0) 本文旨在详细介绍如何在Visual Studio 2010环境下利用Windows Driver Kit (WDK) 7.0来搭建一个完整的驱动开发环境。对于希望从事驱动开发工作的开发者来说,这是一份非常实用...
总的来说,配置DDK在VS2008的驱动开发环境涉及安装WDK,创建驱动工程,设置工程属性,编写和编译代码,以及进行调试。这是一个细致且需要耐心的过程,但通过这个过程,开发者可以更深入地理解和控制操作系统的内部...
### Windows驱动开发环境配置详解 #### 一、概述 Windows驱动程序开发是一项充满挑战的任务,尤其是在Windows内核级别的驱动开发中。为了顺利完成这项工作,首先需要构建一个稳定的开发环境。本文将详细介绍如何...
NDIS驱动开发涉及到网络驱动的多个层次,包括协议驱动、过滤驱动和微型端口驱动等。本开发指南将深入探讨NDIS驱动开发,特别是中间层驱动程序(IMD)的开发。 一、NDIS概述 NDIS作为网络驱动程序的基础,定义了上层...
以下是对Windows驱动开发及VS2008环境配置的详细阐述: 1. **驱动程序类型**: - Windows驱动程序分为不同类型,如Kernel-Mode Drivers(内核模式驱动)、User-Mode Drivers(用户模式驱动)、Filter Drivers...
1. **驱动程序模型**:Windows 7支持多种驱动程序模型,如Kernel-Mode Driver Framework (KMDF) 和User-Mode Driver Framework (UMDF),它们为驱动开发提供了抽象层,简化了驱动的编写过程。 2. **驱动程序生命周期...
组态王驱动开发是针对工业自动化领域中广泛应用的组态软件——组态王(KINGSCADA)进行的定制化工作。驱动程序是连接硬件设备和软件应用的关键桥梁,允许软件控制和通信硬件设备。本篇文章将从基础概念、开发环境、...
Windows7 WDK VS2010 VisualDDK 驱动开发环境搭建 在 Windows7 平台上构建驱动开发环境是驱动开发的第一步。下面将详细介绍如何使用 WDK 和 VS2010搭建驱动开发环境。 首先,需要安装 VS2010 和 WDK7.60(GRMWDK_...
此外,安全性和稳定性是驱动开发的重点,因为任何错误都可能导致系统崩溃或数据丢失。 总之,Windows驱动开发入门涉及多个层次的知识,从简单的“Hello World”驱动到复杂的USB和Windows CE驱动,都需要开发者具备...
总的来说,USB驱动开发流程涉及硬件理解、驱动模型选择、枚举配置处理、设备描述符解析、设备对象创建、传输机制实现、回调函数处理、电源管理、测试调试以及签名发布等多个环节。每个步骤都需要精确的编程和深入的...
《竹林蹊径:深入浅出Windows驱动开发源码》是一部专为想要深入了解Windows驱动程序开发的工程师量身打造的指南。这本书通过丰富的实例和源码解析,带领读者步入驱动开发的世界,帮助他们掌握驱动程序的基本原理和...
在本教程中,我们将探讨Linux设备驱动开发中的IDE(Integrated Development Environment)驱动,这是一种用于存储设备,如硬盘和光驱的接口驱动。 Linux设备驱动主要分为字符设备驱动、块设备驱动和网络设备驱动等...
在Windows 7环境下,开发者使用VS2008和WinDDK进行驱动开发。Visual Studio 2008提供了一个友好的开发界面和调试工具,而WinDDK则包含了编写驱动程序所需的头文件、库和构建工具。开发者可以使用C或C++语言编写驱动...
在驱动开发过程中,DbgView可以帮助开发者跟踪驱动运行时的调试输出,便于定位错误和异常。 DEPENDS.EXE是依赖项查看器,它可以分析可执行文件或动态链接库所依赖的模块。在驱动开发中,确保驱动程序正确加载所需的...