Solved

howto build a device driver file

Posted on 2004-04-08
4
231 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_
Comment Utility


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
Comment Utility
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
Comment Utility
PAQed, with points refunded (125)
ee_ai_construct - CS Mod
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now