WIA Microdriver sample - fix for access violation during scan/preview RRS feed

  • General discussion

  • Just wanted to pass something along that I noticed yesterday while trying to get the WIA microdriver sample from the WDK 8.1 samples running on my machine (Windows 7 Pro x64).

    In the testmcro project in the wia solution, there is a problem in the Scan method in testmcro.cpp, where plReceived is dereferenced to initialize the value as 0.  When a scan or preview is performed, the last time that this method is called where lPhase is SCAN_FINISHED, plRecieved is null and attempting to initialize the value it's pointing to fails.

    To get the sample code working, I just wrapped the initialization inside a check to ensure that the pointer is not null.

    Friday, November 14, 2014 3:49 PM