FIX: Problem with GENPORT.C: PortAddress Not InitializedLast reviewed: October 29, 1997Article ID: Q126285 |
3.50
WINDOWS NT
kbprg kbbuglist kbfixlist kbfile
The information in this article applies to:
SYMPTOMSPORTIO is a code sample for a generic port I/O driver. The sample driver (GENPORT.SYS), which is part of the PORTIO sample, is found on the Windows NT DDK CD in \Q_A\SAMPLES\DDK\PORTIO. There is a problem with this version of the sample in that it does not claim the correct I/O ports during the call to IoReportResourceUsage.
CAUSEThe variable, PortAddress, is not initialized.
RESOLUTIONYou can obtain a corrected version of PORTIO sample from the Microsoft Software Library, from the July 1995 MSDN CD, or you can fix it yourself as instructed below.
Downloading a New CopyDownload PORTIO.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
Fix It YourselfInstead of downloading it, you can fix it yourself by adding two lines to DriverEntry. Change this:
PortBase = DefaultBase; PortCount = DefaultCount; } ExFreePool(paramPath.Buffer); } } // Register resource usage (ports) // // This ensures that there isn't a conflict between this driver and // a previously loaded one or a future loaded one.to this:
PortBase = DefaultBase; PortCount = DefaultCount; } ExFreePool(paramPath.Buffer); } } PortAddress.LowPart = PortBase; PortAddress.HighPart = 0; // Register resource usage (ports) // // This ensures that there isn't a conflict between this driver and // a previously loaded one or a future loaded one. STATUSThe PORTIO sample is corrected in the July 1995 MSDN.
|
Additional reference words: 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |