当我添加Windows.h和Wdm.h时,由于Wdm.h和Winnt.h而出现重定义错误 [英] When i am adding Windows.h and Wdm.h, coming redefinition errors due to Wdm.h and Winnt.h

查看:658
本文介绍了当我添加Windows.h和Wdm.h时,由于Wdm.h和Winnt.h而出现重定义错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的程序中,我包括

  #include< WINDOWS.h>

#include< initguid.h>

#include< devguid.h>

#include< devpkey.h>

#include< diskguid.h>

#include< stdio.h>

#include< cfgmgr32.h>

#include< Wdm.h>

 #include <WINDOWS.h>
#include <initguid.h>
#include <devguid.h>
#include <devpkey.h>
#include <diskguid.h>
#include <stdio.h>
#include <cfgmgr32.h>
#include <Wdm.h>

我使用的是Windows 7-64 Bit,VS2010。我试图使用CM_Get_DevNode_PropertyW(),ZwDeviceIoControlFile()找到EFI分区。我已将Include目录路径提供为:

I am using windows 7-64 Bit, VS2010. I am trying to find EFI partition using CM_Get_DevNode_PropertyW(), ZwDeviceIoControlFile(). I have provided Include directories path as:

  F:\Programs \ WINDDK \ _7600.16385.1 \\\; F:\Programs \ WINDDK \ _7600.16385。 1\inc\api; F:\Programs\WINDDK\7600.16385.1\inc\crt; F:\Programs\WINDDK\7600.16385.1\inc\ddk;

 F:\Programs\WINDDK\7600.16385.1\inc;F:\Programs\WINDDK\7600.16385.1\inc\api;F:\Programs\WINDDK\7600.16385.1\inc\crt;F:\Programs\WINDDK\7600.16385.1\inc\ddk;

请帮助我。

错误如下:

推荐答案

Windows.h是一个用户空间包含文件,WDM.h是一个内核空间包含文件,它们不是为了安装在一起而设计的。  &NBSP;你认为你需要从wdm.h那里打电话给你包括它吗?

Windows.h is a user space include file, WDM.h is a kernel space include file, they are not designed to be installed together.   What call do you think you need out of wdm.h that has made you include it?


这篇关于当我添加Windows.h和Wdm.h时,由于Wdm.h和Winnt.h而出现重定义错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆