Link to home
Start Free TrialLog in
Avatar of human33
human33

asked on

howto build a device driver file

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.
Avatar of _TAD_
_TAD_



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!
Avatar of human33

ASKER

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:)
ASKER CERTIFIED SOLUTION
Avatar of ee_ai_construct
ee_ai_construct
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial