This serial (16550-based RS-232) driver is a WDF version of inbox serial driver present under %DDKROOT%\src\serial\serial directory of the Windows DDK. This sample is functionally equivalent to the WDM version of the sample with two exceptions. 1) This sample doesn’t support Multi-function serial devices. 2) It doesn’t support legacy serial ports – ports that are not detected by the BIOS and as a result not enumerated by the OS.
The code works on Microsoft® Windows® 2000 and later platforms.
The driver also supports Power Management; when the port is not opened, it is powered down and powered up on open. It supports wake-on-ring for platforms that support that function. The driver works on both x86 and 64 bit platforms.
To build the sample, run the build -ceZ command in the DDK build environment. Once built, the sample produces one binary: Serial.sys. The necessary Inf file is msports.inf and is located in the %WINDIR%\inf directory.
You may disable WFP by setting the value SFCDisable (REG_DWORD) in HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Winlogon. By default, SFCDisable is set to 0, which means WFP is active. Setting SFCDisable to 1 will disable WFP. Setting SFCDisable to 2 will disable WFP for the next system restart only (without a prompt to re-enable).
Important: You must have a kernel debugger attached to the system via null modem cable (for example:I386kd.exe or Windbg.exe) to use SFCDisable = 1 or SFCDisable = 2.
After WFP is disabled using the SFCDisable = 1 setting, the following message will appear after logon:
Warning! Windows File Protection is not active on this system. Would you like to enable Windows File Protection now? This will enable Windows File Protection until the next system restart. <Yes> <No>.
Clicking Yes will reactivate WFP until the next system restart. This message will appear at every successful logon until SFCDisable is set to 0.
NOTE: The above message will only be presented to Administrators.
For the serial enumeration spec, read http://www.microsoft.com/technet/prodtechnol/winntas/deploy/nt5serie.mspx#XS
File Description
Serial.htm The documentation for this sample (this file).
Sources The generic file for building this code sample.
Error.c Error operations
Immediate.c Handles the sending of immediate data
Initunlo.c Performs driver initialization and unload
Ioctl.c IOCTL requests
Isr.c Interrupt service routine functionality
Modmflow.c Flow control functionality.
Openclos.c CreateFile / Close functionality
Purge.c Purge operations
Read.c Read operations
Serial.rc Resource data
Utils.c Generic helper functionality
Waitmask.c Wait/Mask functionality
Write.c Write operations
Pnp.c Plug-N-Play support
Registry.c Misc. registry access functions
Wmi.c WMI support
Power.c Power support
Serlog.mc Log messages
|
© 1999 Microsoft Corporation