Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
This is my code;
 

CleanUp();
 
           m_objFilterGraph = new FilgraphManager();
           string strFileName = DBUtils.ImagePath + "\\" + strFolderName + "\\" + txtFileID.Text.Trim() + ".AVI";
           if (File.Exists(strFileName))
           {
               m_objFilterGraph.RenderFile(strFileName);-Error come this line
 
               m_objBasicAudio = m_objFilterGraph as IBasicAudio;
 
               try
               {
                   m_objVideoWindow = m_objFilterGraph as IVideoWindow;
                   m_objVideoWindow.Owner = (int)panel2.Handle;
                   m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
                   m_objVideoWindow.SetWindowPosition(panel2.ClientRectangle.Left,
                       panel2.ClientRectangle.Top,
                       panel2.ClientRectangle.Width,
                       panel2.ClientRectangle.Height);
               }
               catch (Exception)
               {
                   m_objVideoWindow = null;
               }
 
               m_objMediaEvent = m_objFilterGraph as IMediaEvent;
 
               m_objMediaEventEx = m_objFilterGraph as IMediaEventEx;
               m_objMediaEventEx.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0);
 
               m_objMediaPosition = m_objFilterGraph as IMediaPosition;
 
               m_objMediaControl = m_objFilterGraph as IMediaControl;
 

               m_objMediaControl.Run();
               tabCtrlImage.SelectedTab = tbVideo;
               tbVideo.Focus();
           }
           else
               return;
 
       }
 

 

i press the video play button that time one error is came.. COM Exception was unhandled Exception from HRESULT 0x80040255..HOW TO SOLVE THIS ERROR
Posted 26-Jan-13 18:59pm
Comments
Sandeep Mewara at 27-Jan-13 1:30am
   
It would be good to share exact error.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

it looks like your COM component is not installed properly and It is not able to create an Object of FilgraphManager on second line. Better debug there and see if you are getting some object of FilgraphManager.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Can you try out by uninstalling and installing back the Direct-X. It looks like a a Direct-X crash.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 420
1 CHill60 410
2 Sergey Alexandrovich Kryukov 384
3 PIEBALDconsult 245
4 BillWoodruff 243


Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100