This newsletter contains archived content. No warranty is made as to technical accuracy of content or currency of URLs.
The Microsoft Hardware Newsletter provides manufacturers and developers the latest technical details for how to succeed with the Windows platform. Stay up to date on beta and final product releases, and specifications for new technologies. Register now, if you're not already receiving the Microsoft Hardware Newsletter.
|
From the Editor
|
|
|
The kernel-mode stack is 12K, right? That's what we thought until someone pointed out that stack size varies on different platforms-and that stack availability differs for DPCs and ISRs compared to other driver routines. Everyone agrees, however, that kernel-mode stack is a scarce resource and that running out of stack is a surefire way to crash the system.
|
| • |
Never allocate large data structures on the stack, especially if you need to pass the data to another function.
|
| • |
Use the stack for simple counters or pointers and allocate pool memory to store larger data, whether it's a local buffer for the function or a structure needed for a function call.
|
| • |
Better yet, design functions to take pointers to structures rather than individual variables as parameters and pass a pointer to a local copy of the structure to the target function-it'll save stack space on the subsequent call.
|
| • |
And, please, avoid deeply nested or recursive calls, which can rapidly deplete stack space.
|
In addition to these techniques, we learned how to find out how much stack space is available, by calling IoGetStackLimits and IoGetRemainingStackSize (within limits- read the Driver Tip to find out what these are).
And we learned a few techniques for debugging kernel-mode stack use in a driver, including how to use PREfast to track down functions that are hogging the stack. One of the Windows developers even sent us a disassembly of a function, which made our eyes bug out, but we wrote about it just the same.
WHDC after Dark: After that, I was just down the hall convincing my boss that we're working so hard we don't even have time to click the links people send us in e mail. Perhaps you have time to click through...
And finally: the favorite downloads on WHDC right now are the WinHEC agenda and Driver DevCon agenda. Get the hour-by-hour details of what's happening at these events.
Annie Pearson
for the WHDC team
News for Kernel-Mode Developers
|
|
Suppose you're writing a driver for a device that contains several different kinds of sensors. You want to allow clients to open individual sensors and you want to give more than one client access to a given sensor at a time, but you want to avoid the complexity of writing a bus driver that exposes each sensor through Plug and Play. How?
Use file-system-style notation to define a "sensor namespace" for your device object and figure out which sensor is being opened by parsing the file name in the create request. Read the Driver Tip for details.
Check the Windows DDK for information on how to secure a driver's device objects from unauthorized access.
|
Kits, Tools, Services, and Programs
|
|
The Microsoft Windows Hardware Compatibility Test (HCT) 12.1 is now available. You can use this new kit to prepare test submissions to qualify products for the "Designed for Windows" logo for hardware for Windows XP SP2, Windows XP x64 Edition, Windows Server 2003 SP1, and 64-bit editions of Windows Server 2003.
WHQL has published several important notices concerning "Designed for Windows" testing:
| • |
May 18, 2005, is the last day for submissions that use HCT 12.0 and HCT 11.2.
|
| • |
May 18, 2005, is the last day for device submissions for Windows Server 2003 SP1 using RC2.
|
| • |
You can use HCT 12.1 for x86-based and Intel Itanium server submissions on Windows Server 2003 RTM version.
|
|
Device Fundamentals Tips and News
|
|
A new download is available that provides the Microsoft DirectX 9.0c end-user redistributable that developers can include with their product. This update includes the DirectX for Managed Code Update from the DirectX 9.0 SDK Update (February 2005).
|
System Fundamentals Tips and News
|
|
An 180-day trial version of Microsoft Virtual Server 2005 is now available for download. Virtual Server 2005 guest virtual machine environments are optimized for Windows Server 2003, Windows 2000 Server, and Windows NT Server 4.0, yet users can run a broad range of x86-based operating systems. This evaluation software includes all the features of the final retail version of Virtual Server 2005, such as SCSI support, two-node clustering, and an enhanced COM API for improved control.
New Windows products from Microsoft are launching in 2005. The vast majority of the new servers and high-end workstations sold in 2005 will be 64-bit capable. Now is the time to get ready for the upcoming demand of 64-bit computing. Microsoft, Intel, and HP are joining to bring technical training to a city near you.
Interest in 64-bit editions of Windows increased with last week's announcement of the new 64-bit-capable line of Intel Pentium 4 Series 600 processors. Download the trial software to receive the "release candidate 2" version of Windows Server 2003 Enterprise x64 Edition, which supports both AMD64 processors and Intel EM64T processors.
Find out about MOM and hardware management before you get to WinHEC.
Sign up for the Download Notifications service from Microsoft. Each week new downloads are available in the categories you select. You'll receive a customized e-mail notification that lists just the information you care about.
|
Security and Reliability
|
|
Security is a multidimensional issue, and risks can come from anywhere. You could write bad error-handling code or be too generous with permissions. You could forget what services are running on your server. You could accept all user input. And the list goes on. To give you a head start on protecting your machines, your network, and your code, here are 10 tips to follow for a safer network strategy.
Security as a Life Cycle Issue: The goal of the Secure Software Forum is to provide a starting place for cross-industry discussions and education on how best to implement an Application Security Assurance Program (ASAP).
The last part of this three-part webcast series focuses on the need for secure code. It discusses memory issues, buffer overruns, and heap overruns, and how to defend your code against them.
|
WHDC Events
|
|
WinHEC delivers over 100 hours of technical information for engineers, designers, and business decision-makers who create products for the Windows hardware platform.
Take a peek at what happens behind the scenes when the WHDC team works to set the WinHEC Agenda.
Driver DevCon is a forum for advanced driver developers and test engineers who have extensive experience developing or testing Windows drivers.
Some of the DDK MVPs have strong opinions about why Windows Driver DevCon matters to professionals who are developing and testing Windows drivers. They are looking forward to the event-and they are just now studying the Driver DevCon Agenda.
|
|
|
|
 Edition for March 8, 2005
|
|
Events for Engineers and Developers
|
|
|