我正在使用 VS2012,Windows Phone 8 SDK。我需要本地访问相机。
我通过调用 PhotoCaptureDevice::OpenAsync 成功创建了一个 PhotoCaptureDevice 实例,然后在 create_task() 和 task.then() 的帮助下获取打开的设备 - mCaptureObject。
然而,
mCaptureObject->Close()
导致编译错误。
CameraStream.cpp(xxx): error C2039: 'Close' : is not a member of Windows::Phone::Media::Capture::PhotoCaptureDevice'
这是 msdn 的链接: PhotoCaptureDevice.Close()
我检查了 photocapturedevice 类声明:
public : virtual unknown-type Close() new sealed = Platform::IDisposable::Dispose
Member of Windows::Phone::Media::Capture::PhotoCaptureDevice
Summary:
Releases resources that are associated with the capture device.
任何想法?