This sample shows how to write a Windows Image Acquisition (WIA) Microdriver for a flatbed scanner. The Microdriver architecture is functionally reduced from the WIA Minidriver architecture, but supports the primary scanning functions. Documentation on WIA Microdrivers is provided in the “Windows DDK ”. This sample driver can be used as a starting point for your development, but your driver should access the scanner hardware through one of the kernel drivers provided with Windows.
This sample will not work on Windows 98 or Windows 2000.
To build the sample follow these steps:
1. In the Start menu, select "Free Build Environment" or "Checked Build Environment" under "Windows DDK" to open a command window and set basic environment variables needed to build drivers.
2. Change to the directory containing the sample driver source code, src\preview\wdm\wia\microdrv.
3. Execute the "build" command. After the build completes, a driver named Testmcro.dll will be located in a subdirectory.
To use the driver, first install it following these steps:
To test this driver, open the Scanners and Cameras folder in Explorer or use the Wiatest application.
Use one of these options to test this driver:
1. The Scanners and Cameras Wizard accessible from the Start menu.
2. The Namespace extension accessible by opening the camera in Explorer.
3. The Wiatest application is provided in this DDK.
4. Microsoft Paint, a native WIA application.
5. Any TWAIN compliant application.
WIA information: http://www.microsoft.com/hwdev/tech/wia
DDK information: http://www.microsoft.com/ddk/
Files Description
------------ -------------------------------------------------------
testmcro.cpp Implements the Microdriver
makefile Used for building the driver--do not modify
resource.h Header file for resources
sources Controls building of driver
testmcro.def Linker command file
testmcro.htm This readme
testmcro.inf Installation file
testmcro.h Main header file
testmcro.rc Resource definitions
testmcro.rcv Resource definitions