DDK compilation warnings

GPaterson used Ask the Experts™
Hi hi,
Another Q, hopefully a quick one.

I have just installed the W2k3 DDK added the include, lib and exe directories (the wnet platform directories) to my settings in VS.net 2003 and put the DDK directories to the top of the list.

Now, as soon as I create a project and include something like ntddk.h and compile I am getting things like this....

d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(2699) : warning C4162: '_ReturnAddress' : no function with C linkage found

d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7407) : warning C4162: '_InterlockedExchange' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7433) : warning C4162: '_InterlockedIncrement' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7446) : warning C4162: '_InterlockedDecrement' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7460) : warning C4162: '_InterlockedExchangeAdd' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7490) : warning C4162: '_InterlockedCompareExchange' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7553) : warning C4162: '_InterlockedOr' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7563) : warning C4162: '_InterlockedAnd' : no function with C linkage found
d:\Program Files\WINDDK\3790\inc\ddk\wnet\ntddk.h(7573) : warning C4162: '_InterlockedXor' : no function with C linkage found

I cant find any documentation on it on the web...Microsoft give their usual three word description that actually tells you less than you already knew. I know it's just a warning but what is causing it. I am assuming if anyone else has installed the DDK they must have come across it.

Am I missing a lib? I linked nt.lib ntdll.lib wdm.lib

The project is a Win32 Dynamic DLL

Please dont just tell me to use a pragma warning as this doesnt fix or answer the problem, it just covers it up.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
>The project is a Win32 Dynamic DLL
What type of driver do you make?


hopefully an NDIS Intermediate Filter driver


should it be a static dll?
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I'm not experienced enough in "NDIS Intermediate" development, but recommend you to take a look at the microsoft
sample "PASSTHRU.SYS - Sample NDIS Intermediate Driver". I've checked that it can be compiled without any problems.
And by the way it's SYS, not DLL.

No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: GloomyFriar {http:#10202670}

Please leave any comments here within the next four days.

EE Cleanup Volunteer


Another useless answer / question thanks EE.

None of the solutions provided here answered my question. The problem which I eventually fixed myself after many tedious hours is it takes a lot of specific project settings to get the DDK to compile correctly in Visual Studio.

For the record the microsoft example is not very helpful by itself so the accepted answer will probably not be of use to anyone reading this question at a later date.

The part about being a sys file is indeed useful and true, unfortunately it does not tell me how to set up a visual studio project for the DDK.

I got most of my answer from a DDK project template for VS 6.0 which I then used to create my own project template for .Net 2003.

Since this question has kindly been closed off I will not post up any details of the project settings or how to actually fix the problem. If someone needs the actual answer to this question. i.e. How to set up a DDK project in .Net 2003 post another question for 150 points and I will post up my project settings that work.


I'm sorry that this question has been closed in an incorrect way.
I made a recommendation and in the time after that there was no comment of you telling that it was useless, and it is because of that that it was closes as recommended.

It would really help if next time you could place your comment before the question gets closed, or at least after an expert suggest something to be done, if it didn't work, please say so, so that there won't be useless answer / questions in EE PAQ database.

Regarding your points, I would probably suggest that you place a post in the CS area just to see if they can handle it.



PS: The same goes to the other question.
The question was answered.
The question was not "How to configure MSVC for driver compilation?", was it?.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial