如何在Vista下使用WIA 1进行开发?

发布于 07-15 21:48 字数 217 浏览 9 评论 0 原文

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

早茶月光 2024-07-22 21:48:09

MS 允许您下载适用于 XP 的 WIA 2.0 库 "="">此处。 这样您的客户就可以按原样使用您的应用程序。

另外,相比 1.0,我更喜欢 WIA 2.0。

MS does allow you to download the WIA 2.0 library for XP here. That way your customer can use your app as is.

Also, I like WIA 2.0 more than 1.0.

你怎么敢 2024-07-22 21:48:09

我在 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.

归属感 2024-07-22 21:48:09

一般来说,你可以。 但是,您的 Vista 系统上仍然需要有 WIA1 Dll。 我过去执行此操作的方法是将 WIA1 Dlls 从 XP 复制到 XP 框中。 我不注册 WIA1 dll,只是引用它们。 通过引用它们,您的代码现在使用 WIA1。 理论上,您仍然可以在 Vista 上运行和测试,因为 WIA2 应该向后兼容 WIA1。 尽管为了确定起见,您应该使用 XP 进行测试。

如果您没有其他机器,我建议您看一下 VMWare,以便您可以安装新的 XP 并以这种方式获取 Dll。

You can, in general. However, you will still need to have the WIA1 Dlls on your Vista system. The way I've done this in the past is to copy the WIA1 Dlls from XP to the XP box. I don't register the WIA1 dlls, but just reference them. By referencing them, your code now uses WIA1. In theory, you can still run and test on Vista because WIA2 should be backwards compatible with WIA1. Although you should test with XP just to be sure.

If you don't have another machine, I would recommend you take a look at VMWare so that you can install a new XP and get the Dlls that way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文