Click here to Skip to main content
15,885,032 members
Articles / Desktop Programming / MFC
Article

A DDK's project wizard for VC2003

Rate me:
Please Sign up or sign in to vote.
3.36/5 (19 votes)
14 Nov 2003CPOL2 min read 826.1K   2.5K   28   26
A DDK's project wizard for VC2003.

Introduction

I used command line to compile DDK driver, but never got used to it. So I thought, why not write a wizard to do that.

So I did, and can compiled DDK's example and even WinpCap's NDIS driver.

Background

I stole some QuickSYS' files, and I appreciate the author very much.

Using the code

First, you may have to install DDK. This Wizard depends on the environment variable "ddkroot". If you want to build NDIS driver, please add NDIS.lib to your project.

For common use, just create a new project, choose the "DDK wizard", and press button "Finish", and then everything is OK.

If you want to compile the DDK's examples, you may refer to one file named "sources" in the example directory. Some macros are defined in that file.

For example. you may want to compile DDK's Passthru sample:

  1. Create a new project using this wizard, and delete the c and h file which is created by wizard, because we don't need them now.
  2. Copy the files(*.c, *.h, *.rc) from ntddk\src\network\ndis\passthru to the project directory.
  3. Add these files to the project.
  4. File "sources" are like the following:
    //...
    TARGETNAME=PASSTHRU
    TARGETPATH=obj 
    TARGETTYPE=DRIVER 
    TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib 
    C_DEFINES=$(C_DEFINES) -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT 
    INCLUDES=..\..\inc 
    SOURCES= passthru.c \ protocol.c \ miniport.c \ passthru.rc 
    //...

So now you know what to do next?

Add NDIS.LIB to your project, add NDIS40, NDIS_MINIPORT_DRIVER, NDIS40_MINIPORT to pre-compile macros. And then build debug and release, you will get success except some warnings.

Points of Interest

This is my first DDK wizard, and DDK is hard for me to master. So this wizard can't be very good. I tested it all in WIN2K DDK. If I have enough time, I will write a NDIS project wizard. May support NIC, IM, TDI or so.

Finally, sorry for my poor English.

History

11-07-2003 - the wizard script can run now.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
China China
i have a dog.
i'm working on a game.
i 'm 中国江苏人。

Comments and Discussions

 
Question你太强了 you are bestr Pin
Member 1362449216-Aug-18 15:39
Member 1362449216-Aug-18 15:39 
QuestionCompilation Unsuccesfull, Please Help. Pin
bnc20-Sep-08 22:03
bnc20-Sep-08 22:03 
Joke你很强! Pin
Betree17-Sep-08 16:43
Betree17-Sep-08 16:43 
General如何设置SevenCatDDK向导! Pin
susandy6-Mar-07 20:53
susandy6-Mar-07 20:53 
QuestionWould you like something more generic? Pin
SOlli27-Oct-06 16:10
SOlli27-Oct-06 16:10 
GeneralYou GOOD Pin
Georgi Petrov15-Sep-06 1:49
Georgi Petrov15-Sep-06 1:49 
Generalvirtual sound card driver Pin
Ashok Jaiswal3-Sep-06 23:37
Ashok Jaiswal3-Sep-06 23:37 
GeneralPlease upgrade it [modified] Pin
Ali Tavakol15-Jul-06 2:56
Ali Tavakol15-Jul-06 2:56 
GeneralRe: Please upgrade it Pin
SevenCat3-Sep-06 23:41
SevenCat3-Sep-06 23:41 
GeneralGreat Article Pin
wwhh3934-Jun-06 21:03
wwhh3934-Jun-06 21:03 
GeneralRe: Great Article Pin
cdh92826-Jun-06 2:15
cdh92826-Jun-06 2:15 
GeneralDDK Pin
Member 147636721-Nov-04 20:52
Member 147636721-Nov-04 20:52 
GeneralRe: DDK Pin
SevenCat22-Nov-04 4:06
SevenCat22-Nov-04 4:06 
QuestionIt works, How you did this???? Pin
Georgi Petrov20-Aug-04 4:29
Georgi Petrov20-Aug-04 4:29 
AnswerRe: It works, How you did this???? Pin
Georgi Petrov20-Aug-04 4:35
Georgi Petrov20-Aug-04 4:35 
GeneralRe: It works, How you did this???? Pin
SevenCat22-Aug-04 15:30
SevenCat22-Aug-04 15:30 
GeneralRe: It works, How you did this???? Pin
Georgi Petrov26-Aug-04 0:50
Georgi Petrov26-Aug-04 0:50 
Generalunresolved external symbol __load_config_used Pin
pro29-Jul-04 0:08
pro29-Jul-04 0:08 
GeneralRe: unresolved external symbol __load_config_used Pin
jeremysay26-Apr-05 7:13
jeremysay26-Apr-05 7:13 
GeneralRe: unresolved external symbol __load_config_used Pin
superbinny27-Jul-05 22:50
superbinny27-Jul-05 22:50 
GeneralRe: unresolved external symbol __load_config_used Pin
Bocave25-Jun-07 4:35
Bocave25-Jun-07 4:35 
GeneralRe: unresolved external symbol __load_config_used Pin
VincentKao2-Jul-07 3:39
VincentKao2-Jul-07 3:39 
GeneralNice Idea Pin
Fad B16-Nov-03 4:23
Fad B16-Nov-03 4:23 
GeneralRe: Nice Idea Pin
SevenCat17-Nov-03 2:46
SevenCat17-Nov-03 2:46 
GeneralRe: Nice Idea Pin
Fad B18-Nov-03 11:51
Fad B18-Nov-03 11:51 
Thanks very much for your answer, it helped me a lot Smile | :)

But I did not find how to increase the stack size !

What kind of Kernel Driver are you working on ? Have you ever made a File System Filter Driver ?

Bye
Rose | [Rose] Rose | [Rose] Rose | [Rose]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.