You also are including at least on user mode file (windef.h). This file
defines _WIN32, and I think that may be how your getting a mix of X86
and X64. It also includes other files, some of which will set
WINVER/_WINNT_WIN32/et. c. and I believe that NTDDI_VERSION can be set
based on some combination of those. These are all guesses.
I’m amazed that this compiles; are you sure it does? Let me ask this
one more time: has this ever worked? If not, please, please, please
start over with a clean project. I realize that you didn’t mean to do
this, but it’s ridiculous, as all you need to do is include exactly one
of NTDDK.H, NTIFS.H or WDM.H, copy a generic sources file, and add any
project specific libraries to TARGETLIBS. That’s it.n By the time you
trace the preprocessed output of all the files involved, and the
massacre that is the build system, you could spend a week on this
problem. There’s no reason to do this. You could write a new sources
file in ten minutes.
So, in short, my best guess is to stop including windef.h. If that
doesn’t do it, I don’t the specific answer, and I’m giving up at this
point, because what you need to do is start over. The other thing that
I would recommend is to build one of the WDK sample projects for VISTA
X64 CHK. If it doesn’t work, you’ve done something very strange to your
machine, and you’re then down to uninstalling all DDKs/WDK’s and
reinstalling until a sample builds correctly.
Good luck,
mm
David Craig wrote:
Did you ever notice that ntddk.h includes wdm.h? That may cause some
problems. I would review the release notes. You may include one or the
other but not both and that was even more critical in the old DDKs.
wrote in message news:xxxxx@ntdev…
>> Hi all,
>> Thank you!
>> Tim,I’m afraid I am not allowed to transmit the source code by my
>> company.But thank you for your interntness also.
>> In the source code, we define one main header file “viausbmodem.h”,in this
>> file,include some files:
>> -------------------------------------------------------------------------------
>> #include <wdm.h>
>> #include <stddef.h>
>> #include <stdarg.h>
>> #include <ntddk.h>
>> #include <ntddser.h>
>> #include <wmistr.h>
>> #include <wmilib.h>
>> #include <windef.h>
>> #include <wmistr.h>
>> #include <wdmguid.h>
>> #include <string.h>
>> #include <usbdi.h>
>> #include <usbdlib.h>
>> #include <busbdbg.h>
>> -------------------------------------------------------------------------------
>> And other c files just #include “viausbmodem.h” .
>>
>> The WDK I installed is “6000.16386.061101-2205-LRMWDK.A.ISO”,just download
>> from microsoft’s web site.And I full install it in Vista64, there has
>> directory "…WinDDK\6000\lib\wlh\amd64" ,ntstrsafe.lib and usbd.lib are
>> in this folder.
>>
>>
>>
>>
>>
>
>
></busbdbg.h></usbdlib.h></usbdi.h></string.h></wdmguid.h></wmistr.h></windef.h></wmilib.h></wmistr.h></ntddser.h></ntddk.h></stdarg.h></stddef.h></wdm.h>