views:

867

answers:

4

Hi All,

I am new to win32 programming and also to driver programing. I have installed windows DDK on my system and have got some examples with the DDK but those examples dont have dsw file,

i wanted to know how can i create .dsw file so that i can open that workspace in VC6

please help me in this regard.

Thanks in advance

A: 

VC6 is very old these days, can't you use a newer version? Anyway, as I recall, you can just open the project file as a workspace, the IDE will create the .dsw file for you.

1800 INFORMATION
Hi,thanks for that quick response. But if i am correct there is no project file in win ddk examples. I can see only makefile, makefile.mkand project file wat u r referring is .dsp file, thats not there in DDK examples,awaiting for your suggesstions
Vinayaka Karjigi
+1  A: 

The last time I looked (which was years ago), you don't build device drivers using the Visual Studio IDE: the DDK has its own build.exe utility (similar idea but not the same as makefiles); and apparently this is still true as of early 2008, see for http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/4382c9b66f8611e9?pli=1

I expect that "how to build" is described in the DDK documentation.

ChrisW
Hi ChrisW,thanks for that info.this means that there is no way debug through DDK examples?I wanted to execute line by line and understand flow.How can this be done for DDK examplesawaiting for ur response
Vinayaka Karjigi
Well, the build *can* generate symbolic debug information files, so debugging *is* possible. I *don't* think you can use the *Visual Studio IDE debugger* though (though that may depend on what sort of device driver it is anyway: is it a user-mode or a kernel mode driver that you're interested in?). Not using the VS IDE debugger doesn't mean you can't debug: it means you use a different kind of debugger (when I was doing it, years ago, the principal kernel-mode debuggers were called WinDbg and/or Softice).
ChrisW
You should still be able to use a debugger, although probably the Visual Studio debugger is out of the question for driver development
1800 INFORMATION
This may not sound like good news, but once you've learned how to build the sample, to debug, and to read the DDK documentation, the rest of the job is more-or-less ordinary.
ChrisW
+1  A: 

Most people who build DDK/WDK projects in Visual Studio do so using a 'makefile' project that invokes the DDK's build.exe utility. This works quite well- you get the code navigation capabilities of Visual Studio while building your DDK project using the standard, supported DDK tools.

Note that the DDK comes with it's own set of compilers, and those compilers should be used to build DDK projects.

OSR has a little set of cmd scripts that is supposed to make this easier (it's been years since I've done anything with those; I really can't remember how well they work):

Another similar tool is available from Hollis Technology:

As far as debugging goes, unfortuantely the VS debugger won't work for kernel mode driver debugging. For that, get the Debugging Tools for Windows package which has a great set of debuggers. The GUI debugger, WinDbg, is quite nice even if it's not quite up to the usability of Visual Studio's. And the documentation with the Debugging Tools is outstanding - you can learn a lot about Windows internals just by reading the WinDbg docs.

Michael Burr
"own set of compilers" -- Really? I thought it used the same (commandline-driven) compiler as the IDE.
ChrisW
They are usually slightly different version in the minor version number area - I'm not saying you'll run into a bunch of problems, but the DDK team will definitely not support other compilers. Also, when a new version of Windows is coming out, there is often new stuff in the DDK compiler that's not in the released version of VC.
Michael Burr
A: 

ChrisW is correct, you can't use Visual Studio (unless there is a way to set it).

Anyway, for start debugging you can use DebugView to print simple messages with DbgPrint.

Nick D