You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
265 lines
13 KiB
265 lines
13 KiB
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html xmlns:v="urn:schemas-microsoft-com:vml"
|
|
xmlns:o="urn:schemas-microsoft-com:office:office"
|
|
xmlns:w="urn:schemas-microsoft-com:office:word"
|
|
xmlns="http://www.w3.org/TR/REC-html40">
|
|
|
|
<head>
|
|
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
|
|
<meta name=ProgId content=Word.Document>
|
|
<meta name=Generator content="Microsoft Word 9">
|
|
<meta name=Originator content="Microsoft Word 9">
|
|
<link rel=File-List href="./wiacam_files/filelist.xml">
|
|
<title>wiacam</title>
|
|
<!--[if gte mso 9]><xml>
|
|
<o:DocumentProperties>
|
|
<o:LastAuthor>Dave Parsons</o:LastAuthor>
|
|
<o:Revision>2</o:Revision>
|
|
<o:TotalTime>3262</o:TotalTime>
|
|
<o:Created>2001-01-12T19:57:00Z</o:Created>
|
|
<o:LastSaved>2001-01-12T19:57:00Z</o:LastSaved>
|
|
<o:Pages>2</o:Pages>
|
|
<o:Words>502</o:Words>
|
|
<o:Characters>2864</o:Characters>
|
|
<o:Company>Microsoft Corp.</o:Company>
|
|
<o:Lines>23</o:Lines>
|
|
<o:Paragraphs>5</o:Paragraphs>
|
|
<o:CharactersWithSpaces>3517</o:CharactersWithSpaces>
|
|
<o:Version>9.3821</o:Version>
|
|
</o:DocumentProperties>
|
|
</xml><![endif]--><!--[if gte mso 9]><xml>
|
|
<w:WordDocument>
|
|
<w:HideSpellingErrors/>
|
|
<w:HideGrammaticalErrors/>
|
|
</w:WordDocument>
|
|
</xml><![endif]-->
|
|
<style>
|
|
<!--
|
|
/* Style Definitions */
|
|
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
|
{mso-style-parent:"";
|
|
margin:0in;
|
|
margin-bottom:.0001pt;
|
|
mso-pagination:widow-orphan;
|
|
font-size:12.0pt;
|
|
font-family:"Times New Roman";
|
|
mso-fareast-font-family:"Times New Roman";
|
|
color:black;}
|
|
h1
|
|
{margin-right:0in;
|
|
mso-margin-top-alt:auto;
|
|
mso-margin-bottom-alt:auto;
|
|
margin-left:0in;
|
|
mso-pagination:widow-orphan;
|
|
mso-outline-level:1;
|
|
font-size:24.0pt;
|
|
font-family:"Times New Roman";
|
|
color:black;
|
|
mso-font-kerning:18.0pt;
|
|
font-weight:bold;}
|
|
h2
|
|
{margin-right:0in;
|
|
mso-margin-top-alt:auto;
|
|
mso-margin-bottom-alt:auto;
|
|
margin-left:0in;
|
|
mso-pagination:widow-orphan;
|
|
mso-outline-level:2;
|
|
font-size:18.0pt;
|
|
font-family:"Times New Roman";
|
|
color:black;
|
|
font-weight:bold;}
|
|
h3
|
|
{margin-right:0in;
|
|
mso-margin-top-alt:auto;
|
|
mso-margin-bottom-alt:auto;
|
|
margin-left:0in;
|
|
mso-pagination:widow-orphan;
|
|
mso-outline-level:3;
|
|
font-size:13.5pt;
|
|
font-family:"Times New Roman";
|
|
color:black;
|
|
font-weight:bold;}
|
|
a:link, span.MsoHyperlink
|
|
{color:blue;
|
|
text-decoration:underline;
|
|
text-underline:single;}
|
|
a:visited, span.MsoHyperlinkFollowed
|
|
{color:blue;
|
|
text-decoration:underline;
|
|
text-underline:single;}
|
|
p
|
|
{margin-right:0in;
|
|
mso-margin-top-alt:auto;
|
|
mso-margin-bottom-alt:auto;
|
|
margin-left:0in;
|
|
mso-pagination:widow-orphan;
|
|
font-size:12.0pt;
|
|
font-family:"Times New Roman";
|
|
mso-fareast-font-family:"Times New Roman";
|
|
color:black;}
|
|
pre
|
|
{margin:0in;
|
|
margin-bottom:.0001pt;
|
|
mso-pagination:widow-orphan;
|
|
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
|
|
font-size:10.0pt;
|
|
font-family:"Courier New";
|
|
mso-fareast-font-family:"Courier New";
|
|
color:black;}
|
|
@page Section1
|
|
{size:8.5in 11.0in;
|
|
margin:1.0in 1.25in 1.0in 1.25in;
|
|
mso-header-margin:.5in;
|
|
mso-footer-margin:.5in;
|
|
mso-paper-source:0;}
|
|
div.Section1
|
|
{page:Section1;}
|
|
/* List Definitions */
|
|
@list l0
|
|
{mso-list-id:371000526;
|
|
mso-list-type:hybrid;
|
|
mso-list-template-ids:619977120 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
|
|
@list l1
|
|
{mso-list-id:745304408;
|
|
mso-list-type:hybrid;
|
|
mso-list-template-ids:501628894 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
|
|
@list l2
|
|
{mso-list-id:1382750078;
|
|
mso-list-type:hybrid;
|
|
mso-list-template-ids:-98557440 -1634539084 1364493882 -555997176 1048594918 1907263124 1809221600 353402950 -1899568204 803906870;}
|
|
ol
|
|
{margin-bottom:0in;}
|
|
ul
|
|
{margin-bottom:0in;}
|
|
-->
|
|
</style>
|
|
<!--[if gte mso 9]><xml>
|
|
<o:shapedefaults v:ext="edit" spidmax="1027"/>
|
|
</xml><![endif]--><!--[if gte mso 9]><xml>
|
|
<o:shapelayout v:ext="edit">
|
|
<o:idmap v:ext="edit" data="1"/>
|
|
</o:shapelayout></xml><![endif]-->
|
|
</head>
|
|
|
|
<body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'
|
|
leftmargin=8>
|
|
|
|
<div class=Section1>
|
|
|
|
<h1><a name=MYSAMPLE>Sample WIA Camera Driver</a></h1>
|
|
|
|
<h1><span style='font-size:14.0pt;mso-bidi-font-size:24.0pt;color:red'>[This is
|
|
preliminary documentation and subject to change.]<o:p></o:p></span></h1>
|
|
|
|
<h2>SUMMARY</h2>
|
|
|
|
<p>This sample shows how to write a Windows Image Acquisition (WIA) user-mode
|
|
minidriver for a camera. It simulates a camera by reading images from a directory
|
|
on the hard disk. This sample driver can be used as a starting point for your
|
|
development, but your driver should access the camera hardware through one of
|
|
the kernel drivers provided with Windows.</p>
|
|
|
|
<p>This sample is implemented in 3 parts. This part is the main minidriver.
|
|
The “Fakecam” sample implements a camera microdriver that this driver calls.
|
|
The third part is the sample UI extension “Extend.”</p>
|
|
|
|
<p>This sample will not work on Windows 98 or Windows 2000.</p>
|
|
|
|
<h3>BUILDING THE SAMPLE</h3>
|
|
|
|
<p>To build the sample follow these steps:</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
|
|
tab-stops:list .5in'><![if !supportLists]>1.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>In the Start menu, select<span style="mso-spacerun:
|
|
yes"> </span>"Free Build Environment" or "Checked Build
|
|
Environment" under "Windows DDK" to open a command window and
|
|
set basic environment variables needed to build drivers. </p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
|
|
tab-stops:list .5in'><![if !supportLists]>2.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>Change to the directory containing the sample driver source
|
|
code, src\wdm\wia\wiacam.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
|
|
tab-stops:list .5in'><![if !supportLists]>3.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>Execute the "build" command. After the build
|
|
completes, a driver named Wiacam.dll will be located in an object subdirectory.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
|
|
tab-stops:list .5in'><![if !supportLists]>4.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>Also build the microdriver in src\wdm\wia\fakecam and the user
|
|
interface extension located in the src\wdm\wia\extend directory.</p>
|
|
|
|
<h3>USING THE SAMPLE<o:p></o:p></h3>
|
|
|
|
<p><! ---------------- Snip Snip ---------------- >To use the driver, first
|
|
install it following these steps: </p>
|
|
|
|
<ol start=1 type=1>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>Copy Wiacam.dll from the
|
|
appropriate object subdirectory under Wiacam to a new, empty directory.</li>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>Do the same with Extend.dll
|
|
and Fakecam.dll.</li>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>Copy Wiacam.inf to the same
|
|
directory.</li>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>In Windows Me or Windows XP,
|
|
open the “New Device” icon in the Scanners and Cameras control panel.</li>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>Click the “Have Disk” button
|
|
and enter the name of the folder created in step 1.</li>
|
|
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
|
|
mso-list:l2 level1 lfo5;tab-stops:list .5in'>Click OK, Next, or Finish
|
|
until the wizard is finished.</li>
|
|
</ol>
|
|
|
|
<p>Sample camera driver reads images from <i>"image"</i> directory of the profile folder of LOCAL SERVICE account. The default location of this directory
|
|
is <i>"c:\Documents and Settings\LocalService\image"</i>, however it may be different on a particular Windows installation. You may need to enable viewing of hidden and protected
|
|
OS files in order to browse this folder (to do so, open Windows Explorer, choose <i>Tools, Folder Options, View</i>, then check <i>"Show hidden files and folders"</i>, and uncheck
|
|
<i>"Hide protected operating system files"</i>).</p>
|
|
|
|
<p>Use one of these options to test this driver:</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
|
|
tab-stops:list .5in'><![if !supportLists]>1.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>The Scanners and Cameras Wizard accessible from the Start
|
|
menu.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
|
|
tab-stops:list .5in'><![if !supportLists]>2.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>The Namespace extension accessible by opening the camera in
|
|
Explorer.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
|
|
tab-stops:list .5in'><![if !supportLists]>3.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>The Wiatest application provided in this DDK.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
|
|
tab-stops:list .5in'><![if !supportLists]>4.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>Microsoft Paint, a native WIA application.</p>
|
|
|
|
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
|
|
tab-stops:list .5in'><![if !supportLists]>5.<span style='font:7.0pt "Times New Roman"'>
|
|
</span><![endif]>Any TWAIN compliant application.</p>
|
|
|
|
<h3>RESOURCES</h3>
|
|
|
|
<p>WIA information: <a href="http://www.microsoft.com/hwdev/tech/wia">http://www.microsoft.com/hwdev/tech/wia</a></p>
|
|
|
|
<p>DDK information: <a href="http://www.microsoft.com/ddk/">http://www.microsoft.com/ddk/</a></p>
|
|
|
|
<h3>CODE TOUR</h3>
|
|
|
|
<h3>File Manifest</h3>
|
|
|
|
<pre>Files<span style="mso-spacerun: yes"> </span>Description</pre><pre>------------<span style="mso-spacerun: yes"> </span>-------------------------------------------------------</pre><pre>CCamMicro.cpp<span style="mso-spacerun: yes"> </span>Implements wrapper for microdriver DLL</pre><pre>CcamMicro.h<span style="mso-spacerun: yes"> </span>Header for microdriver DLL wrapper</pre><pre>Child.cpp<span style="mso-spacerun: yes"> </span>Implements functions for non-root items</pre><pre>IStiUSD.cpp<span style="mso-spacerun: yes"> </span>Implements STI interfaces</pre><pre>IWiaMiniDrv.cpp<span style="mso-spacerun: yes"> </span>Implements WIA interfaces</pre><pre>Makefile<span style="mso-spacerun: yes"> </span>Used for building the driver--do not modify</pre><pre>pch.h<span style="mso-spacerun: yes"> </span>Precompiled header</pre><pre>resource.h<span style="mso-spacerun: yes"> </span>Header file for resources</pre><pre>Root.cpp<span style="mso-spacerun: yes"> </span>Implements functions for root item</pre><pre>Sources<span style="mso-spacerun: yes"> </span>Controls building of driver</pre><pre>wiacam.cpp<span style="mso-spacerun: yes"> </span>Implements COM and DLL functions</pre><pre>wiacam.def<span style="mso-spacerun: yes"> </span>Linker command file</pre><pre>wiacam.h<span style="mso-spacerun: yes"> </span>Main header for driver</pre><pre>wiacam.htm<span style="mso-spacerun: yes"> </span>This readme</pre><pre>wiacam.inf<span style="mso-spacerun: yes"> </span>Installation file</pre><pre>wiacam.rc<span style="mso-spacerun: yes"> </span>Resource definitions</pre><pre>wiacam.rcv<span style="mso-spacerun: yes"> </span>Additional resource definitions</pre><pre><![if !supportEmptyParas]> <![endif]><o:p></o:p></pre>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|