Solved

howto build a device driver file

Posted on 2004-04-08
4
234 Views
Last Modified: 2008-02-26
Hi ,

i'm programming a test in C for a windows xp embedded target. i need to map memory for a pci card(it's a PDrive) : the problem is that i can't include wdm.h which is used for memory management since win2k.  i downloaded the DDK and compiled it but i think you can't use it in visual studio .net because it works fine in visual C++ embedded for CE.  but i 'm not testing CE -> it is for XP embedded.  

another more simple question is also where to find a pci tool for XP embedded that discovers the busadresses of the pci and IRQ numbers.
0
Comment
Question by:human33
4 Comments
 
LVL 22

Expert Comment

by:_TAD_
ID: 10783442


whew...  I hate to be the one to tell you this, but I think you've got the wrong forum, and a few misconceptions about .Net (no offense intended).


1) Every device driver I've ever worked *MUST* be compiled to machine code so the device can interface with it directly.  This may no longer be true, but it is how I know it to be.  .Net can NOT compile to machine code.  It never could, and it never will.

2) Visual C++ is a lot different than C#, or even C++.Net.  

3) The difference between Win XP and Win CE is immaterial to .NET.  It just comes down to how big your libraries are.  If a .Net app works on WinCE it will definately work on WinXP.  But again, I am not convinced you have a .Net application.

If you really want to find out, if you working application is a .Net application locate your ILDASM.exe (it will be on a machine with the .Net SDK installed).  Open ILDASM and then point it at your working DLL.  If it opens up and shows you some IL code and all your functions... you've got a .net app.  if on the other hand, you try to open it and it gives you an error about "not a valid CLR entry and could not be disassembled"... then you do not have a .Net compiled app.

cheers!
0
 

Author Comment

by:human33
ID: 10789816
thx for your reply

actually i'm very lucky to work here because an overgenius person came to explain me some stuff: what you said is true :you CAN'T compile it with visual studio it's just not made for that kind of coding, compiling in an build environment of the windows DDK is what has to happen.  first of all i need to build a driver for the Pdrive for XP embedded otherwise you can't just call the operating system and say: give me some memory for that kind of device i want to do things with it.  after that the application CAN ask for memory through the driver to the kernel and then crashing(really like this) will be certain until the tests are correct. of course first creating drivers in windows pfuw .... the smaller the os the easier so that not good.  

yet there is hope : yesterday we got an virgin sample of the driver running but lot's of routines are missing.  i assume i am indeed on the wrong forum like you said but i don't think there are good forums for this kind of stuff.  

long day's it will be but why sleep it's overrated:)
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11756960
PAQed, with points refunded (125)
ee_ai_construct - CS Mod
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question