locked
Exception from HRESULT: 0xC00DABE8

    Question

  • I'm trying to capture stream from external usb camera (C#, Windows 8). The following code:

    DeviceInformationCollection devInfoCollection = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);
                    MediaCaptureInitializationSettings settings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
                    settings.VideoDeviceId = devInfoCollection[0].Id;
                    mediaCaptureMgr = new MediaCapture();
                    await mediaCaptureMgr.InitializeAsync(settings);

    In last line (await mediaCaptureMgr.InitializeAsync(settings)) is triggered exception. The variable settings is not null. settings: (VideoDeviceId ="\\?\USB#VID_05E3&PID_0510&MI_00#7&2D043328&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\GLOBAL")

    Exception text:

    Exception from HRESULT: 0xC00DABE8 Source  "mscorlib"

    Ok. I tried to do such as:

    try
    {
       mediaCaptureMgr = new MediaCapture();
       await mediaCaptureMgr.InitializeAsync();
       myCaptureElement.Source = mediaCaptureMgr;
       await mediaCaptureMgr.StartPreviewAsync();
    
    }
    catch (Exception ee)
    {
       String s = ee.ToString();
    }

    Anyway error occurs on the line (mediaCaptureMgr.InitializeAsync()) In this case:       s="System.Exception: Exception from HRESULT: 0xC00DABE8\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n   at TestVideo.MainPage.d__0.MoveNext() in c:\Users\Admin\Documents\Visual Studio 2012\Projects\TestVideo\TestVideo\MainPage.xaml.cs:line 53"

    And Exception are same:"Exception from HRESULT: 0xC00DABE8"


    help me to solve this problem! Thanks!



    Friday, March 15, 2013 1:23 PM

All replies