Thanks to a response yesterday from Peter, I am trying to use
ZwSetInformationThread, which is defined in NTDDK.H.
But now, I’m having trouble compiling and linking my driver. If I just
include <ntddk.h>, I get a compile error saying no such file. If I give the
explicit path, then I get a link error “error LNK2019: unresolved external
symbol imp ZwSetInformationThread@16”
What I’m thinking is that by using NTDDK.H instead of WDM.H, my include
and library paths are no longer set correctly. So, what do I have to do
if I want to use NTDDK.H? Is it a flag in the SOURCES file?
I’m using the WINDDK\2600 DDK, but I tried this on the Win2000 and NTDDKs
as well with similar results.</ntddk.h>
If you are including ntddk.h you shouldn’t be setting DRIVERTYPE=WDM
in your sources file.
-----Original Message-----
From: Brian Franklin [mailto:xxxxx@hotmail.com]
Sent: Friday, April 05, 2002 12:24 PM
To: NT Developers Interest List
Subject: [ntdev] WDM driver with NTDDK.HThanks to a response yesterday from Peter, I am trying to use
ZwSetInformationThread, which is defined in NTDDK.H. But now,
I’m having trouble compiling and linking my driver. If I
just include <ntddk.h>, I get a compile error saying no such
> file. If I give the explicit path, then I get a link error
> “error LNK2019: unresolved external symbol
> imp ZwSetInformationThread@16” What I’m thinking is that
> by using NTDDK.H instead of WDM.H, my include and library
> paths are no longer set correctly. So, what do I have to do
> if I want to use NTDDK.H? Is it a flag in the SOURCES file?
>
> I’m using the WINDDK\2600 DDK, but I tried this on the
> Win2000 and NTDDKs as well with similar results.
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> %%email.unsub%%
></ntddk.h>
“Roddy, Mark” wrote in message news:xxxxx@ntdev…
>
> If you are including ntddk.h you shouldn’t be setting DRIVERTYPE=WDM
> in your sources file.
>
In fact DON’T set TARGETTYPE=WDM at all, no matter what include file you
use, unless you REQUIRE compatibility with WinMe/Se/9x.
Real, native, Win2K/XP/.NET kernel mode drivers shouldn’t (need to) link
with wdm.lib.
Peter
OSR
That’s nice to know. Thanks Peter.
By the way, with your help, I do have the processor affinity now working.
Now on to the real work. Thanks again.
I could swear I got hammered for saying exactly this, and lectured about
how wdm was the way forward and not ‘the backwards compatability with
windos flag’. But then again the search engine for ntdev is a bit lame,
so I might be hallucinating the whole thing. I guess there must be
multiple meanings for ‘wdm’.
=====================
Mark Roddy
Windows XP/2000/NT Consultant, Microsoft MVP
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Viscarola
Sent: Friday, April 05, 2002 5:06 PM
To: NT Developers Interest List
Subject: [ntdev] Re: WDM driver with NTDDK.H“Roddy, Mark” wrote in message
> news:xxxxx@ntdev…
> >
> > If you are including ntddk.h you shouldn’t be setting
> DRIVERTYPE=WDM
> > in your sources file.
> >
> In fact DON’T set TARGETTYPE=WDM at all, no matter what
> include file you use, unless you REQUIRE compatibility with
> WinMe/Se/9x.
>
> Real, native, Win2K/XP/.NET kernel mode drivers shouldn’t
> (need to) link with wdm.lib.
>
> Peter
> OSR
>
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> %%email.unsub%%
>
>
>
“Mark Roddy” wrote in message news:xxxxx@ntdev…
>
> I could swear I got hammered for saying exactly this, and lectured about
> how wdm was the way forward and not ‘the backwards compatability with
> windos flag’.
>
That’s right. WDM.H is the “forward moving” set of APIs. Go look up the
mail. At the time I said, to your consternation, to use WDM.H and NOT to
use targettype=WDM.
>
> But then again the search engine for ntdev is a bit lame,
>
Or not. There are actually two search engines: the one you get from via the
OSR home page, and the one you get to via http://www.osr.com/lists – Choose
the one you prefer.
They are both being re-written, by the way, to be fully SQL based. Should
be done within a month.
Peter
OSR