Microsoft KB Archive/323430

= HOW TO: Enable Logging of Wiadebug.log in Windows Server 2003 =

PSS ID Number: 323430

Article Last Modified on 12/18/2003

-

The information in this article applies to:


 * Microsoft Windows Server 2003, Datacenter Edition
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Standard Edition
 * Microsoft Windows Server 2003, Web Edition
 * Microsoft Windows Server 2003, 64-Bit Datacenter Edition
 * Microsoft Windows Server 2003, 64-Bit Enterprise Edition
 * Microsoft Windows Small Business Server 2003, Premium Edition
 * Microsoft Windows Small Business Server 2003, Standard Edition

-



This article was previously published under Q323430



This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about how to obtain support for a Beta release, see the documentation that is included with the Beta product files, or check the Web location from which you downloaded the release.

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

For a Microsoft Windows XP version of this article, see 307001.

IN THIS TASK

 * SUMMARY
 * ** How to Enable Logging of the Wiadebug.log File
 * Troubleshooting



SUMMARY
In Windows Server 2003, the Windows Image Acquisition (WIA) service runs under the LocalService context. The Wiadebug.log file is created in multiple folders; however, the Wiadebug.log file in C:\Documents and Settings\LocalService contains the most useful information. Please note that the C:\Documents and Settings\LocalService folder is a hidden folder. To view this folder, make sure that you clear the Hide protected operating system files (Recommended) option in Folder Options. Other locations for the Wiadebug.log file include:
 * C:\Windows
 * C:\Documents and Settings\

NOTE: By default, the WIA service is not turned on in Windows Server 2003.

How to Enable Logging of the Wiadebug.log File
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

The information that the WIA service logs in the Wiadebug.log file can be very helpful during driver development. The logging level is controlled by an entry in the registry. For WIA, this entry resides in the following registry key, where  is the name of the appropriate binary module:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StillImage\Debug\ \DebugFlags

For the WIA service, the appropriate binary module is Wiaservc.dll.

The DebugFlags value controls the logging level. The following are three settings for the DebugFlags value:
 * 0x00000001: Display error messages
 * 0x00000002: Display warning messages
 * 0x00000004: Display trace messages

The value for DebugFlags is a flag value; that is, different settings may be read together. To turn on logging for errors, warnings, and traces all at one time, set DebugFlags to 0x0000007.

If you change the value of DebugFlags, stop the WIA service (stisvc), and then restart it for the changes to take effect.

To stop the WIA service, type the following line at a command prompt, and then press ENTER:

net stop stisvc

To start the WIA service, type the following line a command prompt, and then press ENTER:

net start stisvc

NOTE: When logging levels are set too high, this can lead to a significant reduction in performance. Increase the logging level only when you are trying to solve a particular problem. After you have corrected the problem, set the logging level back to its original level.

back to the top

Troubleshooting
The following scenario describes a typical problem, and explains how you can use the information in the Wiadebug.log file to resolve the problem.

Scenario: You have written a program to test a scanner driver that is under development. For one of the tests, you try to set the scanner's dots per inch (dpi) setting to 1200, but you notice that this action produces an error.

The following data is logged in Wiadebug.log:

wiasGetChangedValueLong, validate prop 6147 failed hr: 0x80070057

wiasUpdateScanRect, CheckXResAndUpdate failed (0x80070057)

CDrvWrap::WIA_drvValidateItemProperties, Error calling driver:

drvValidateItemProperties with hr = 0x80070057

NOTE: This behavior is typical if a program writes an invalid value.

These log entries indicate that the driver is reporting that the program wrote an invalid value. It is not clear from this information what the exact problem is. If you increase the WIA logging level to report warnings and the errors, the following information is logged in Wiadebug.log:

wiasValidateItemProperties, invalid LIST value for :

propID) Horizontal Resolution, value = 1200

Valid values are:
 * 75
 * 100
 * 150
 * 200
 * 300
 * 600

wiasGetChangedValueLong, validate prop 6147 failed hr: 0x80070057

wiasUpdateScanRect, CheckXResAndUpdate failed (0x80070057)

CDrvWrap::WIA_drvValidateItemProperties, Error calling driver:

drvValidateItemProperties with hr = 0x80070057

NOTE: This behavior is typical if the program writes an invalid value.

The output shows that the Horizontal Resolution property is causing the failure. The program is trying to set the resolution to 1200, but the list of supported resolutions does not include 1200. Therefore, the WIA service validation helper (wiasValidateItemProperties) rejects the request to set this value.

Now that you have identified the problem, you can determine whether to revise the driver or the program. If the scanner's specifications permit it to support all resolutions between 100 and 1400 dpi, the driver should be able to handle a request for 1200 dpi. If the scanner does not support this setting, change the program so that it does not try to set the Horizontal Resolution property to a value that is not valid for this property. In this case, you want the program to determine that a value is valid before it tries to set a property to this value.

back to the top

Additional query words: kbmgmtsvc

Keywords: kbMgmtServices kbhowto kbHOWTOmaster KB323430

Technology: kbSBServ2003Pre kbSBServ2003Search kbSBServ2003St kbSBServSearch kbWinServ2003Data kbWinServ2003Data64bit kbWinServ2003Data64bitSearch kbWinServ2003DataSearch kbWinServ2003Ent kbWinServ2003Ent64bit kbWinServ2003Ent64bitSearch kbWinServ2003EntSearch kbWinServ2003Search kbWinServ2003St kbWinServ2003Web

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.