当前位置: 代码迷 >> 驱动开发 >> 这个驱动该如何写
  详细解决方案

这个驱动该如何写

热度:5   发布时间:2016-04-28 10:49:01.0
这个驱动该怎么写?
小弟最近看了Windows驱动开发~~试着写一个HelloWorld级别的驱动,MSDN中如是写道
C/C++ code
/*To define a DriverEntry callback routine, you must first provide a function declaration that Static Driver Verifier (SDV) and other verification tools require, as shown in the following code example:*/DRIVER_INITIALIZE DriverEntry;/*Then, implement your callback routine as follows:*/NTSTATUS   DriverEntry(     _In_ struct _DRIVER_OBJECT  *DriverObject,    _In_ PUNICODE_STRING  RegistryPath     )  {      // Function body  }
我如是写到
C/C++ code
DRIVER_INITIALIZE DriverEntry;extern "C" NTSTATUS  DriverEntry(__in PDRIVER_OBJECT pDriverObject,__in PUNICODE_STRING pRegistryPath )

然后输入build就提示出错: Error C2732: linkage specification contradicts earlier specification 
for 'DriverEntry'
表示不理解,哪里错了???

------解决方案--------------------
恭喜楼主!
我来接分...
  相关解决方案