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.
↑ Back to the top
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.
↑ Back to the top
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.
- 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.
- In the Scanner and Camera Installation Wizard, click
Next.
- Click Have Disk, and then click
Browse.
- Locate and then click the Wiascanr.inf file, click
Open, and then click OK.
- 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. - Start the WIA Scanner Sample Front Panel Simulator tool. In
the WIASCANR Panel dialog box, click Scan.
↑ Back to the top
Microsoft has confirmed that this is a bug in the Microsoft
products that are listed in the "Applies to"
section.
↑ Back to the top
To open the
WIASCANR Panel dialog box, follow these steps:
- Click Start.
- Click Development Kits.
- Click Windows DDK 3790.1830.
- Click Tools.
- Click WIA Scanner Sample Front Panel
Simulator.
↑ Back to the top