Select the product you need help with
HOW TO: Enable Logging of Wiadebug.log in Windows XPArticle ID: 307001 - View products that this article applies to. This article was previously published under Q307001 On This PageSUMMARY
By default, the Windows Image Acquisition (WIA) service logs errors to a file named Wiadebug.log in the Windows_folder folder. This article describes how to enable logging to the Wiadebug.log file. Enable Logging Of Wiadebug.log FileThe information that the WIA service logs in this file can be very helpful during driver development. The logging level is controlled by an entry in the registry. For WIA, this key resides in the following registry key, where Module_name is the name of the appropriate binary module:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\StillImage\Debug\Module_name\DebugFlags
For the WIA service, the appropriate binary module is Wiaservc.dll. The value in DebugFlags controls the logging level. The following list describes three of the settings:
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 Still Image service, open a command prompt, and then run the following command: TroubleshootingThe following scenario describes a typical problem, and describes 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 attempt 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 NOTE: This behavior is typical if a program writes an invalid value.wiasUpdateScanRect, CheckXResAndUpdate failed (0x80070057) CDrvWrap::WIA_drvValidateItemProperties, Error calling driver: drvValidateItemProperties with hr = 0x80070057 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 increases the WIA logging level to report warnings as well as the errors, the following information is logged in Wiadebug.log: wiasValidateItemProperties, invalid LIST value for : propID) Horizontal Resolution, value = 1200 Valid values are:
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 attempting 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 allow 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 attempt to set the Horizontal Resolution to a value that is not valid for this property. In this case, the program should check that a value is valid before attempting to set a property to this value. PropertiesArticle ID: 307001 - Last Review: January 15, 2006 - Revision: 1.2
| Article Translations
|


Back to the top








