Click here to Skip to main content
15,909,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows Driver Development Pin
MickAB5-Mar-01 5:57
MickAB5-Mar-01 5:57 
GeneralRe: Windows Driver Development Pin
.::RockNix::.5-Mar-01 21:29
.::RockNix::.5-Mar-01 21:29 
GeneralRe: Windows Driver Development Pin
MickAB6-Mar-01 1:17
MickAB6-Mar-01 1:17 
GeneralRe: Windows Driver Development Pin
.::RockNix::.6-Mar-01 4:31
.::RockNix::.6-Mar-01 4:31 
GeneralRe: Windows Driver Development Pin
MickAB6-Mar-01 5:50
MickAB6-Mar-01 5:50 
GeneralRe: Windows Driver Development Pin
.::RockNix::.6-Mar-01 21:35
.::RockNix::.6-Mar-01 21:35 
GeneralRe: Windows Driver Development Pin
MickAB6-Mar-01 23:42
MickAB6-Mar-01 23:42 
GeneralRe: Windows Driver Development Pin
Joe Moldovan5-Mar-01 7:10
Joe Moldovan5-Mar-01 7:10 
I am certainly no expert having written only two simple parallel port drivers for 98 and NT but maybe I can give you a bit of advice.

1. Believe it or not, a Win98 driver is much harder to write than an NT (and I suppose 2000) driver. If 98 is not essential I wouldn't bother. In any case I would write for 2000 first and get the feel for how the driver works. Porting to 98 is easier after that.

2. Write a kernel mode driver. Although it's harder to write I think you will find that it gives you much better control and response. The fact that you are going to drive sound hardware almost mandates this.

3. You must understand re-entrant programming and especially clean and "dirty" (shared) data before you begin. The driver is written more or less as a set of parallel routines which are synchronised both by the kernel and by you. If you can write re-entrant code you are half way there.

4. Use a skeleton driver provided by the DDK or from the net. If you try to write it from scratch you will be releasing it for Windows 2010. The skeleton I used was very good and I didn't have to do very much to adapt it. I think you will find the same for the serial port.

5. You must develop using TWO PCs. Don't try to debug on a single machine. It's instant death and only an idiot (eg. myself) would try it. The DDK has tools for remote debugging and you should use these. Also, make sure that your target machine has absolutely nothing running on it. Clean all startup processes out even if you have to modify the registry. The less that's running the better you can debug the driver.

6. Do incremental development. Change one thing at a time. Remember that this is not a sequential process and lots of things are happening at the same time. Also remember that you are in kernel mode. You can kill the machine with a single keystroke.

7. Be extremely careful about memory allocation and deallocation for buffers and things. This is where you can get into real trouble. There are things which you can and cannot do in different parts of the driver.

8. Get two or three different books with lots of examples. I did this project a couple of years ago so the books I had are not relevant to you (and I had to leave them with my client) but I'm sure there is lots out there. Try to get one which uses a serial port driver as an example.

Although developing a driver is complicated it isn't as bad as it looks and it is fun when you get it to work. I hope this helps.

GeneralRe: Windows Driver Development Pin
MickAB5-Mar-01 3:12
MickAB5-Mar-01 3:12 
GeneralHelp needed with PropertySheet Pin
4-Mar-01 23:36
suss4-Mar-01 23:36 
GeneralSetProcessWorkingSetSize and Memory Locking Pin
4-Mar-01 20:07
suss4-Mar-01 20:07 
GeneralRe: SetProcessWorkingSetSize and Memory Locking Pin
4-Mar-01 22:56
suss4-Mar-01 22:56 
GeneralRe: SetProcessWorkingSetSize and Memory Locking Pin
5-Mar-01 1:49
suss5-Mar-01 1:49 
GeneralGlobal variable ... Pin
Hadi Rezaee4-Mar-01 18:15
Hadi Rezaee4-Mar-01 18:15 
GeneralWriting VC++ dll to work with Delphi 5? Help Please!! Pin
4-Mar-01 16:16
suss4-Mar-01 16:16 
GeneralRe: Writing VC++ dll to work with Delphi 5? Help Please!! Pin
l a u r e n4-Mar-01 20:40
l a u r e n4-Mar-01 20:40 
GeneralRe: Writing VC++ dll to work with Delphi 5? Help Please!! Pin
4-Mar-01 22:16
suss4-Mar-01 22:16 
GeneralRe: Writing VC++ dll to work with Delphi 5? Help Please!! Pin
4-Mar-01 22:17
suss4-Mar-01 22:17 
QuestionHOW to use ADO with VC++, please help! Pin
4-Mar-01 11:52
suss4-Mar-01 11:52 
AnswerRe: Try this site.... Pin
Brendan Tregear4-Mar-01 14:30
Brendan Tregear4-Mar-01 14:30 
GeneralRe: Try this site.... Pin
Joe Moldovan5-Mar-01 5:58
Joe Moldovan5-Mar-01 5:58 
GeneralATL, subclassed ListBox Pin
4-Mar-01 6:47
suss4-Mar-01 6:47 
GeneralRe: ATL, subclassed ListBox Pin
Brad Bruce4-Mar-01 9:38
Brad Bruce4-Mar-01 9:38 
GeneralRe: ATL, subclassed ListBox Pin
5-Mar-01 20:44
suss5-Mar-01 20:44 
Generalthis pointer ... Pin
Hadi Rezaee4-Mar-01 5:21
Hadi Rezaee4-Mar-01 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.