Correctly remove the QuickTime control

I am currently developing an application for the Windows platform that can play Quick Time videos. Target OS versions are Windows XP, Windows Vista, and Windows 7.

I have successfully used Apple ActiveX QuickTime Control 2.0 (in C #) and everything works well in Windows XP.

However, in Vista and Windows 7 I have problems with the correct disposal of the control. Here are the β€œsteps to play”: - I dynamically create a fast-time control at runtime, and I put it on the panel;

  • I successfully play a video with him;

  • At some point, I close the main form of the application; application windows will be destroyed and the application will continue to run in the background (performing operations such as video synchronization); at this stage, management is located using the IDisposable template; I cannot explicitly exclude the Movie object (from the ActiveX control) because I get an exception like: "The COM object that was separated from its base RCW cannot be used."; I just use (AxQTOControlLib.AxQTControl) player.Dispose (); On Windows XP this is fine, but not on Vista and 7

  • I restore my application (from the toolbar where it runs in the background), and try opening the video again; At this point, an AccessViolationException "Attempted to read / write protected memory" is thrown;

My questions:

  • Vista Windows 7?

  • XP ?

  • ( ), ?

Movie.Disconnect() ( , , ), QuickTimeTerminate() , . , , .

, MOSU

: , . : QuickTime Windows Media ( ActiveX), , . WindowsMedia , methos IS . .

+3
1

.

: http://www.theusenetarchive.com/usenet-message-how-to-properly-destroy-quicktime-activex-object-10384503.htm

- , . "" Quicktime, FileName URL. Quicktime . (Quicktime ), . Eveything .

+1

Source: https://habr.com/ru/post/1737014/


All Articles