PC Driver Downloader and Updater Software
User-mode debuggers are much more familiar to most developers. Not surprisingly, usermode debuggers are for debugging user-mode applications. The Microsoft Visual Studio .NET debugger is a prime example of a user-mode debugger. Kernel-mode debuggers, as the names implies, let you debug the operating system kernel. These debuggers are used mostly by device driver writers when they're debugging their device drivers.
Windows allows a user to install multiple printers. (More accurately, the user can install device drivers for multiple printers. The printers don't actually have to be attached to the machine.) The installed printers are listed in the Printers dialog box that you can invoke from the Settings item on the Start menu. At any time, only one of these printers is the default printer. You can change which printer is the default in this Printers dialog box.
Components, background executing programs like screensavers, and even extensions to C itself. We're only talking about general applications in this chapter, but we'll cover many of these other possibilities as the book progresses. Two notable exceptions from the C repertoire include ISAPI Extensions and device drivers.
Both functions require a globally unique identifier (GUID) as input for the first argument. The GUID points to a device driver a requirement if the host system provides support for more than one display device. Setting this argument to null tells DirectX to use the active driver. You can also specify one of two constant values to place the system in a test mode hardware (DDCREATE_HARDWAREONLY) or software (DDCREATE_EMULATIONONLY). Because you can supply more than one type of input for this argument, the example provides two overrides of each function.
As previously mentioned, the code doesn't spend a lot of time deciphering the various field values returned by the waveOutGetDevCaps() call. However, it does output the name and version as shown in Figure 11.7. Generally, you'll find that the wave device information will tell you basic device capabilities, device type, and device driver vendor name, but not much else. Any special device capabilities remain hidden unless you write code directly to the device or use other technology such as DirectX. However, this code will tell you enough to write code for simple games, most business applications, and even some multimedia applications.
Obtaining a device handle sounds almost too easy when you first consider it. You use the OpenDriver() function, which accepts three inputs. The first argument is mandatory. It's the device driver name. The second argument is optional and usually unnecessary for modern drivers. It defines the location of the driver information in the registry. The third argument is device-driver specific. Only supply this information if the vendor documentation for the driver requires it. The main problem with the OpenDriver() function is finding the required device driver name, especially if you aren't privy to the vendor documentation (which few of us are). The Platform SDK documentation provides a hint, but only a small hint when it tells you that the default location is the Drivers32 key. The actual location of this information is the NT CurrentVersion Drivers32 key in most cases. Figure 11.5 shows that there are two wave devices in this case wave and wave1. To determine which device to use, you'd...
Prior to founding Wintellect, John was one of the early engineers at NuMega Technologies (now Compuware), where he played key roles in designing, developing, and acting as project manager for BoundsChecker, TrueTime, TrueCoverage, SoftlCE, and TrueCoverage for Device Drivers.
If you are working on a development machine that does not have a printer driver installed or a default printer, you may want to install one (even if you don't have a printer attached or even available) to alleviate possible problems with your report should you need to print in the future. If there is no default printer specified, there is a check box in the Printer Setup shown in Figure 2-23 (located at the top of the dialog) that is marked No Printer.
Where the debug switch tells the linker to generate debug code, the misnamed release switch does not do the opposite and tell the linker to do an optimized release build link. This switch should really be named CHECKSUM. All this switch does is set the checksum value in the Portable Executable (PE) header. While required by device drivers in order to load, it's not required by your user-mode applications. However, it's not a bad idea to set it for your release builds because WinDBG, discussed in Chapter 8, will always report if the checksum isn't set for a binary. You shouldn't add release to debug builds because it requires that incremental linking be turned off. To set release for your release builds, go to the project Property Pages dialog box, Linker folder, Advanced property page, and set the Set Checksum property to Yes ( RELEASE).
The following code sample shows how to use query strings to query WMI programmatically to create a system report. This system report contains the name and state of each Windows service, the connection name and username for each network connection, the name and serial number of each virtual device driver, the product name of every network adapter, and the name and process ID of every process currently executing in the Windows operating system. You use ManagementObjectSearcher to query the CIM using the get method of the ManagementObjectSearcher instance named mos.
One extension command that has saved me countless hours debugging is the handle command. As you can tell by the name, the command has something to do with the handles in a process. Just typing handle by itself will show you the handle values, what type of object that handle contains, and a summary section listing how many of each type of object is in the process. Some of the types displayed might not make sense if you haven't done device drivers or read David Solomon and Mark Russinovich's Inside Microsoft Windows 2000. Table 8-3 provides a translation from the handle command into usermode terminology for some of the types you'll see. Disk file, communication endpoint, or device driver interface
You can set it to any value up to MaximumCopies to force the printer driver to print multiple copies. Collate indicates the order of the copies. If you print two copies of three pages and Collate equals false, the pages will be printed in the order 1, 1, 2, 2, 3, 3. When Collate is true, the order is 1, 2, 3, 1, 2, 3. The default value of Collate depends on the printer.
A wizard works well for a single task that can be accomplished in only one way (like adding a printer driver). As soon as you start adding an element of variety or creativity, the wizard can't keep up. Don't think that you should be proud of a complex wizard that branches out conditionally to use different windows depending on previous user selections. All you've done is created a traditional single-screen DOS program wherein tasks must be completed in separate windows and in a set order.
This same idea relates to the threading concept. Some threads just need to have a higher priority. Just as eating and sleeping are high priorities because they allow us to function, system tasks have higher priorities because the computer needs them to function. Windows prioritizes threads on a scale of 0 to 31, with larger numbers meaning higher priorities. A priority of 0 can only be set by the system and means that the thread is idle. Windows system users can set priorities between 1 and 15. The administrator must set priorities that are higher than 15 (how an administrator does this is discussed later). Threads running in priority between 16 and 31 are considered to be running in real-time. The priority is so high for these threads that they preempt threads in lower priorities. This preemption has the effect of making their execution more immediate. The types of items that might need to run in real-time are processes such as device drivers, file systems, and input devices. Imagine...
WinDBG is included in the Debugging Tools for Windows. It's a hybrid debugger in that it can be a kernel-mode debugger as well as a user-mode debugger and, with a bit of work, WinDBG lets you debug both kernel-mode and user-mode programs at the same time. For kernel-mode debugging, WinDBG offers all the same power of KD because it shares the same debugging engine as KD. However, WinDBG offers a GUI front end that isn't nearly as easy to use as the Visual Studio .NET debugger, although it is easier to use than KD. With WinDBG, you can debug your device drivers nearly as easily as you would your usermode applications.
|Driver Robot Updates Your Drivers|
LionSea Driver Tuner Official Download Link
The best part is you do not have to wait for LionSea Driver Tuner to come in the mail, or drive to a store to get it. You can download it to your computer right now for only $38.97.