Microsoft KB Archive/896701

= BUG: The &quot;WIA Sample Scanner Device&quot; dialog box does not open when you click &quot;Scan&quot; in the &quot;WIASCANR Panel&quot; dialog box in the Windows Server 2003 Service Pack 1 Driver Development Kit (DDK) =

Article ID: 896701

Article Last Modified on 7/25/2005

-

APPLIES TO


 * Microsoft Windows Server 2003 Driver Development Kit, when used with:
 * Microsoft Windows Server 2003 Service Pack 1

-



SYMPTOMS
In the Microsoft Windows Server 2003 Service Pack 1 Driver Development Kit (DDK), the WIA Sample Scanner Device dialog box does not open as expected when you click Scan in the WIASCANR Panel dialog box.



CAUSE
This problem occurs because of a bug in the source code of the WIASCANR sample. When the WIA Scanner Sample Front Panel Simulator tool (scanpanl.exe) triggers an event, the Microsoft Windows Image Acquisition (WIA) service asks for the list of WIA events that the WIASCANR sample supports through the IWiaMiniDrv::drvGetCapabilities method. If the IWiaMiniDrv::drvInitializeWia method is not executed first, the list of WIA capabilities that contains the WIA events that the WIASCANR sample supports is not initialized. The WIASCANR sample cannot successfully detect that the capabilities have not been initialized before the WIASCANR sample returns to the call. Therefore, the WIA service obtains an empty list of WIA events. This causes the WIA Sample Scanner Device dialog box not to open when you click Scan.



RESOLUTION
To resolve this problem, modify the code of the IWiaMiniDrv.cpp file. To do this, follow these steps:  Open the IWiaMiniDrv.cpp file that is contained in the Windows DDK.  Locate the following line of code. if (NULL != m_pCapabilities) { Note You can find this line of code at line 2358 if you use Microsoft Visual Studio .NET to open the IWiaMiniDrv.cpp file.   Change this line of code to the following line of code, and then save the changes to the IWiaMiniDrv.cpp file. if (!m_pCapabilities) {  Open a Windows free build environment. Type the following command at the command prompt in the build environment:

cd src cd wdm cd wia build –cZ copywia

 In Control Panel, open Scanners and Cameras, and then double-click Add Device.</li> In the Scanner and Camera Installation Wizard, click Next.</li> Click Have Disk, and then click Browse.</li> Locate and then click the Wiascanr.inf file, click Open, and then click OK.</li> In the Model box, click WIA Sample Scanner Device, click Next three times, and then click Finish.

Note You do not have to restart the computer unless you are installing over another instance of the WIASCANR sample.</li> Start the WIA Scanner Sample Front Panel Simulator tool. In the WIASCANR Panel dialog box, click Scan.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
To open the WIASCANR Panel dialog box, follow these steps:
 * 1) Click Start.
 * 2) Click Development Kits.
 * 3) Click Windows DDK 3790.1830.
 * 4) Click Tools.
 * 5) Click WIA Scanner Sample Front Panel Simulator.

Additional query words: Windows Image Acquisition (WIA)

Keywords: kbtshoot kbbug KB896701

-

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

© Microsoft Corporation. All rights reserved.