i'm working with VS2012, Windows Phone 8 SDK. I need to access the camera natively.
I have sucesfully created a PhotoCaptureDevice instance by calling PhotoCaptureDevice::OpenAsync, then get the opened device - mCaptureObject - with the help of create_task() and task.then().
caueses compile error.
CameraStream.cpp(xxx): error C2039: 'Close' : is not a member of Windows::Phone::Media::Capture::PhotoCaptureDevice'
here's a link to msdn: PhotoCaptureDevice.Close()
i checked the photocapturedevice class declaration:
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.
Close() on an object, you should invoke that object's destructor. This will happen naturally when the object no longer has references, or you can call
delete mCaptureObject to force the destructor to run immediately. (If you do this while the object still has living references, those other references will be invalid and method calls should throw a
Answer author Andy-rich
Tickanswer.com is providing the only single recommended solution of the question 'Close' : is not a member of 'Windows::Phone::Media::Capture::PhotoCaptureDevice' under the categories i.e visual-studio-2012 , windows-phone-8 , c++-cx , . Our team of experts filter the best solution for you.