Windows 7中的WIA图像捕获 [英] WIA image capture in Windows 7

查看:78
本文介绍了Windows 7中的WIA图像捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下代码在Access中捕获图像。在我的表单上是一个未绑定的OLE图像和一个按钮。当数码相机通过USB连接并打开时单击按钮会使相机拍摄照片并将其显示在OLE图像框中。

Using the code below to capture images in Access. On my form is an unbound OLE image and a single button. Clicking the button when a digital camera is connected via USB and turned on causes the camera to take a pic and show it in the OLE image frame.

展开 | 选择 | Wrap | 行号

推荐答案



为此,我假设您已经为相机安装了一个设备驱动程序,其中包含一个''。 dll''安装Windows Image Acquisition服务。


我的假设是你需要一个不同的Windows 7驱动程序


如果你设置休息 指向代码顶部然后单步执行它,您应该能够识别错误发生的行。


运行代码而不使用任何类型的WIA驱动程序会导致''用户定义的类型未在第7行定义错误。


S7
Hi
For this to work I presume you will have installed a device driver for your camera which will have included a ''.dll'' that installs Windows Image Acquisition services.

My presumption is that you will need a different driver for Windows 7

If you set a break point at the top of the code then step through it, you should be able to identify the line where the error ocurrs.

Running your code without any sort of WIA driver causes a ''User-defined type not defined'' error at Line #7.

S7


Tux:

但在W7中失败并显示错误:对象变量或未设置块变量。
Tux:
but fails in W7 with an error stating: "object variable or with block variable not set".



我不应该告诉你在Tux上出现这种情况的基本知识。您还没有包含过程标题行,这通常是理解代码所必需的 - 特别是当发布的代码是50行时。我不会删除这个问题,因为我确定你会填写详细信息,但请记住以后的问题。

I shouldn''t be needing to tell you the basics like which line this occurs on Tux. You''ve also failed to include the procedure header line, which is often required to make sense of code - especially when the code posted is 50 lines. I won''t delete the question as I''m sure you''ll fill in the details, but please remember for future questions.


谢谢Sierra - 相机通过usb连接时我假设安装了通用驱动程序,是的。它在XP和W7中安装良好,没有交互(Windows自动安装的驱动程序)。这是一个适度的尼康L22点和点击。


NeoPa - 如果我评论第26或27行,我得到提到的错误,相机不拍照。离开26和27,我得到提到的错误,相机拍摄了一个镜头。看着相机SD卡,我看到图像存储在那里,所以我想它只是没有转移。我最近读过WIA可能与W7有关的问题。不幸的是,似乎无法在这个主题上找到太多。
Thanks Sierra - The camera when connected via usb I assume installs a universal driver, yes. It installed fine in XP and W7 with no interaction (Windows auto-installed drivers). It''s a modest Nikon L22 point and click.

NeoPa - If I comment line 26 or 27, I get the error mentioned and the camera does not take the picture. Leaving 26 and 27 in, I get the error mentioned and the camera snaps a shot. Looking at the camera SD card I see the image gets stored there, so I suppose it''s just not transferring. I have read more recently that WIA may have issues with W7. Can''t seem to find much on this topic unfortunately.


这篇关于Windows 7中的WIA图像捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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