Solved

howto build a device driver file

Posted on 2004-04-08
4
232 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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