Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends,

I have copied the silverlight videochat samplecode from "silverlightvideochat.codeplex.com" to try a simple videochat application but getting the below mentioned error while capturing image.

"System.Exception: Class not registered (Exception from HRESULT: 0x80040154)
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.CaptureGraph_Start(CaptureSource Source)
at System.Windows.Media.CaptureSource.Start()
at SocketCoder_WebCamSender.MainPage.btnActivate_Click(Object sender, RoutedEventArgs e)"


I am using 64 bit Operating System, silverlight-4

below is the code block, i am getting the above error on _capture.Start().
private void button1_Click(object sender, RoutedEventArgs e)
{
    // Start The Camera
    if (_capture != null)
    {
        _capture.Stop();
        _capture.VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
        VideoBrush videoBrush = new VideoBrush();
        videoBrush.SetSource(_capture);
        rectVideo.Fill = videoBrush;
        if (CaptureDeviceConfiguration.AllowedDeviceAccess || CaptureDeviceConfiguration.RequestDeviceAccess())
        {
            _capture.Start();
        }
    }
}


I have tried running the application by changing Target Platform to x86 but no success.

Please suggest,

Thanks,
Smitesh
Posted
Updated 26-Dec-13 4:57am
v2
Comments
Irina Pykhova 27-Dec-13 7:15am    
I think, it's COM exception, perhaps some required COM object doesn't exist on your local machine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900