WIA Automation Layer
アセンブラの魔女 ⧫ Windows ⧫ WIA ⧫ WIA Automation Layer
アセンブラの魔女 ⧫ Windows ⧫ WIA ⧫ WIA Automation Layer

 Windows Image Acquisition Automation Layerを使うと、VBScriptや(古い)Visual BasicからWIAデバイスを制御することができます。 WIAを操作するVBScriptはHTMLに組み込むこともできます。

Automation Layerのオブジェクトのguid
開発環境

 HTMLから(VBScriptを使って)Automation Layerのオブジェクトを作るときにobjectタグのclassid属性でAutomation Layerのオブジェクトのguidを指定する必要があります。DeviceManager, CommonDialog, VideoPreview等のオブジェクトについてはWIA Automation Libraryに同梱されているサンプルやmsdnのドキュメントにguidが記載されていますが、それ以外のオブジェクトのguidについては説明がありません。以下はOLE-DLL Viewe調べたAutomation Layerのオブジェクトのguid値です。以下の表で「path」の項目はOLE-DLL Vieweで表示される位置を意味します。

CommonDialog
guid850D1D11-70F3-4BE5-9A11-77AA6B2BB201
path「Grouped by Component Category」 -「Automation Objects」 -「CommonDialog Class」
DeviceManager
guidE1C5D730-7E97-4D8A-9E42-BBAE87C2059F
path「Grouped by Component Category」 -「Automation Objects」 -「DeviceManager Class」
ImagePocess
guidBD0D38E4-74C8-4904-9B5A-269F8E9994E9
path「Grouped by Component Category」 -「Automation Objects」 -「ImagePocess Class」
Rational
guid0C5672F9-3EDC-4B24-95B5-a6C54C0B79AD
pathGrouped by Component Category」 -「Automation Objects」 -「Rational Class」
Vector
guid4DD1D1C3-B36A-4EB4-AAEF-815891A58A30
path「Grouped by Component Category」 -「Automation Objects」 -「Vector Class」
VideoPreview
guid0B5F2CC8-5E1E-44F9-899B-3B789705AFCA
path「Grouped by Component Category」 -「Automation Objects」 -「VideoPreview Class」

 WIA Automation Layerを操作するアプリケーションの開発環境について、msdnのhttp://msdn.microsoft.com/en-us/library/ms630818(v=VS.85).aspxが参考になります。WIA Automation Layerは以下の環境から操作することができます。

  • Visual Basic 6.0
  • Windows Script Host
  • HTML Application
  • Script in an HTML Application
  • Active Server Pages

 WIA Automation Layerを操作するには(基本的に?)Windows Image Acquisition Automation Libraryが必要になります。(2010.7.21時点で)最新バージョンとして2.0がリリースされていますが、これはService Pack 1を適用したWindows XPのみで使えます。それ以降のOSのサポートが気になりますが、Windows Vista以降は組み込みのWIAオートメーションライブラリを持っているようですのでWindows Image Acquisition Automation LibraryがなくてもWIAを操作できると思われます。WIA Automation Libraryのインストールは同梱されているドキュメントに従えば特に戸惑うことも無くインストールに成功すると思います。

 Windows XP環境では、WIA Automation Libraryを使うことで、WIA Automation Layerの機能を利用できるようです。 ただし、このライブラリのドキュメントで説明されているVisual Basicのバージョンは6.0で.NET対応以降のバージョンのVisual Basicでは利用できないようです。

 Windows XP環境では、WIA Automation LibraryをインストールすればVBScriptからWIA Automation Layerを操作できることが確認できました。ライブラリに同梱されているHTML+VBScriptのアプリケーションがそのままIE上で動作しました。

▼ Property
記事情報
datePublished2011-01-01
dateModified2018-06-20
authorアセンブラの魔女
headlineWIA Automation Layerの紹介ページです
keywordsWIA
keywordsWIA Automation Layer
publisher name= wiredFish, logo.name= wiredFish, logo.url= https://books-nekoya.jp/Programming/chigu-hagu-title-01.png size= 208 pixel x 50 pixel
image.url url= https://books-nekoya.jp/Programming/chigu-hagu-title-01.png , size= 208 pixel x 50 pixel