How to use take a Photo in MS-Access in Vista or later - maybe MediaCapture or DirectShow

旧巷老猫 提交于 2019-12-24 12:17:56

问题


How to use MediaCapture or DirectShow API in MS-Access? As WIA is outdated for cameras.

WIA examples exist but not MediaCapture or DirectShow

I almost never use VBA but need to capture a photo using Access 2013. I have found a .net example by MS that looks like it will do want I need, how to get it to work in VBA in Access?

      ' Using Windows.Media.Capture.CameraCaptureUI API to capture a photo 
        Dim dialog As New CameraCaptureUI()  
        Dim file As StorageFile = Await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo) 

MS says: WIA does not support cameras in Windows Vista or later. There are lots of good examples of how to use WIA with access, but am not finding anything for MediaCapture/DirectShow API

.net MediaCapture example:

Main File: CapturePhoto.xaml.vb in

https://code.msdn.microsoft.com/windowsapps/CameraCaptureUI-Sample-845a53ac/sourcecode?fileId=43599&pathId=1212418128

.net DirectShow example:

http://www.codeproject.com/Articles/671407/Camera-Net-Library

This explains how to make available in MS Access as a DLL: A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6?

来源:https://stackoverflow.com/questions/32110648/how-to-use-take-a-photo-in-ms-access-in-vista-or-later-maybe-mediacapture-or-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!