如何在Vista下使用WIA 1进行开发? [英] How to develop using WIA 1 under Vista?

查看:122
本文介绍了如何在Vista下使用WIA 1进行开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Vista SP1下使用VS2008 SP1.我的.Net程序使用COM引用WIA(Microsoft Windows图像采集库v2.0).我正在使用CommonDialogClass.ShowAcquireImage来扫描文档,并且工作正常. 我的一位客户正在运行XP.据我了解,WIA在XP下必须使用WIALib(WIA 1.0).是否可以使用WIA1在Vista下进行开发?

I'm using VS2008 SP1 under Vista SP1. My .Net-program uses a COM reference to WIA (Microsoft Windows Image Acquisition Library v2.0). I'm using CommonDialogClass.ShowAcquireImage to scan a document and it's working fine. One of my customers is running XP. As I understand WIA, under XP you have to use WIALib (WIA 1.0). Is it possible to develop under Vista using WIA1?

推荐答案

我在Windows XP下使用VS2008设置了一个小的WIALib项目,并将创建的Interop.WIALib.dll复制到了我的Vista机器上.当我在C#项目中引用此文件时,可以对其进行编译.现在我有两个项目,一个用于XP,一个用于Vista.通过GetVersionEx调用,我可以确定C ++程序中正在运行的Windows版本,并调用适当的Dll的方法.

I setup a small WIALib-project with VS2008 under Windows XP and copied the created Interop.WIALib.dll to my Vista machine. When I reference this file in a C# project, I can compile it. Now I have two projects, one for XP and one for Vista. With a GetVersionEx-call I determine the running Windows-version in my C++-program and call the method of the adequate Dll.

这篇关于如何在Vista下使用WIA 1进行开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆