1 /*****************************************************************************
2 * plugin.cpp: ActiveX control for VLC
3 *****************************************************************************
4 * Copyright (C) 2005 the VideoLAN team
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21 *****************************************************************************/
25 #include "oleobject.h"
26 #include "olecontrol.h"
27 #include "oleinplaceobject.h"
28 #include "oleinplaceactiveobject.h"
29 #include "persistpropbag.h"
30 #include "persiststreaminit.h"
31 #include "persiststorage.h"
32 #include "provideclassinfo.h"
33 #include "connectioncontainer.h"
34 #include "objectsafety.h"
35 #include "vlccontrol.h"
36 #include "viewobject.h"
37 #include "dataobject.h"
46 ////////////////////////////////////////////////////////////////////////
49 // {E23FE9C6-778E-49d4-B537-38FCDE4887D8}
50 //const GUID CLSID_VLCPlugin =
51 // { 0xe23fe9c6, 0x778e, 0x49d4, { 0xb5, 0x37, 0x38, 0xfc, 0xde, 0x48, 0x87, 0xd8 } };
53 static LRESULT CALLBACK VLCInPlaceClassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
61 if( GetUpdateRect(hWnd, NULL, FALSE) )
63 BeginPaint(hWnd, &ps);
69 return DefWindowProc(hWnd, uMsg, wParam, lParam);
73 static LRESULT CALLBACK VLCVideoClassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
74 VLCPlugin *p_instance = reinterpret_cast<VLCPlugin *>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
84 if( GetUpdateRect(hWnd, &pr, FALSE) )
87 GetClientRect(hWnd, &bounds);
88 BeginPaint(hWnd, &ps);
89 p_instance->onPaint(ps.hdc, bounds, pr);
95 return DefWindowProc(hWnd, uMsg, wParam, lParam);
99 VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance) :
100 _p_class_ref(p_class_ref),
101 _hinstance(hInstance)
105 if( ! GetClassInfo(hInstance, getInPlaceWndClassName(), &wClass) )
107 wClass.style = CS_NOCLOSE|CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS;
108 wClass.lpfnWndProc = VLCInPlaceClassWndProc;
109 wClass.cbClsExtra = 0;
110 wClass.cbWndExtra = 0;
111 wClass.hInstance = hInstance;
113 wClass.hCursor = LoadCursor(NULL, IDC_ARROW);
114 wClass.hbrBackground = NULL;
115 wClass.lpszMenuName = NULL;
116 wClass.lpszClassName = getInPlaceWndClassName();
118 _inplace_wndclass_atom = RegisterClass(&wClass);
122 _inplace_wndclass_atom = 0;
125 if( ! GetClassInfo(hInstance, getVideoWndClassName(), &wClass) )
127 wClass.style = CS_NOCLOSE|CS_HREDRAW|CS_VREDRAW;
128 wClass.lpfnWndProc = VLCVideoClassWndProc;
129 wClass.cbClsExtra = 0;
130 wClass.cbWndExtra = 0;
131 wClass.hInstance = hInstance;
133 wClass.hCursor = LoadCursor(NULL, IDC_ARROW);
134 wClass.hbrBackground = NULL;
135 wClass.lpszMenuName = NULL;
136 wClass.lpszClassName = getVideoWndClassName();
138 _video_wndclass_atom = RegisterClass(&wClass);
142 _video_wndclass_atom = 0;
145 HBITMAP hbitmap = (HBITMAP)LoadImage(getHInstance(), TEXT("INPLACE-PICT"), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
146 if( NULL != hbitmap )
150 pictDesc.cbSizeofstruct = sizeof(PICTDESC);
151 pictDesc.picType = PICTYPE_BITMAP;
152 pictDesc.bmp.hbitmap = hbitmap;
153 pictDesc.bmp.hpal = NULL;
155 if( FAILED(OleCreatePictureIndirect(&pictDesc, IID_IPicture, TRUE, reinterpret_cast<LPVOID*>(&_inplace_picture))) )
156 _inplace_picture = NULL;
161 VLCPluginClass::~VLCPluginClass()
163 if( 0 != _inplace_wndclass_atom )
164 UnregisterClass(MAKEINTATOM(_inplace_wndclass_atom), _hinstance);
166 if( 0 != _video_wndclass_atom )
167 UnregisterClass(MAKEINTATOM(_video_wndclass_atom), _hinstance);
169 if( NULL != _inplace_picture )
170 _inplace_picture->Release();
173 STDMETHODIMP VLCPluginClass::QueryInterface(REFIID riid, void **ppv)
178 if( (IID_IUnknown == riid) || (IID_IClassFactory == riid) )
181 *ppv = reinterpret_cast<LPVOID>(this);
188 return E_NOINTERFACE;
191 STDMETHODIMP_(ULONG) VLCPluginClass::AddRef(void)
193 return InterlockedIncrement(_p_class_ref);
196 STDMETHODIMP_(ULONG) VLCPluginClass::Release(void)
198 ULONG refcount = InterlockedDecrement(_p_class_ref);
207 STDMETHODIMP VLCPluginClass::CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
214 if( (NULL != pUnkOuter) && (IID_IUnknown != riid) ) {
215 return CLASS_E_NOAGGREGATION;
218 VLCPlugin *plugin = new VLCPlugin(this, pUnkOuter);
221 HRESULT hr = plugin->QueryInterface(riid, ppv);
225 return E_OUTOFMEMORY;
228 STDMETHODIMP VLCPluginClass::LockServer(BOOL fLock)
238 ////////////////////////////////////////////////////////////////////////
240 VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
254 vlcOleObject = new VLCOleObject(this);
255 vlcOleControl = new VLCOleControl(this);
256 vlcOleInPlaceObject = new VLCOleInPlaceObject(this);
257 vlcOleInPlaceActiveObject = new VLCOleInPlaceActiveObject(this);
258 vlcPersistStorage = new VLCPersistStorage(this);
259 vlcPersistStreamInit = new VLCPersistStreamInit(this);
260 vlcPersistPropertyBag = new VLCPersistPropertyBag(this);
261 vlcProvideClassInfo = new VLCProvideClassInfo(this);
262 vlcConnectionPointContainer = new VLCConnectionPointContainer(this);
263 vlcObjectSafety = new VLCObjectSafety(this);
264 vlcControl = new VLCControl(this);
265 vlcViewObject = new VLCViewObject(this);
266 vlcDataObject = new VLCDataObject(this);
268 // configure controlling IUnknown interface for implemented interfaces
269 this->pUnkOuter = (NULL != pUnkOuter) ? pUnkOuter : dynamic_cast<LPUNKNOWN>(this);
272 _pict = p_class->getInPlacePict();
274 // set default/preferred size (320x240) pixels in HIMETRIC
275 HDC hDC = CreateDevDC(NULL);
276 _extent.cx = (320*2540L)/GetDeviceCaps(hDC, LOGPIXELSX);
277 _extent.cy = (240*2540L)/GetDeviceCaps(hDC, LOGPIXELSY);
281 VLCPlugin::~VLCPlugin()
283 vlcOleInPlaceObject->UIDeactivate();
284 vlcOleInPlaceObject->InPlaceDeactivate();
286 delete vlcDataObject;
287 delete vlcViewObject;
289 delete vlcObjectSafety;
290 delete vlcConnectionPointContainer;
291 delete vlcProvideClassInfo;
292 delete vlcPersistPropertyBag;
293 delete vlcPersistStreamInit;
294 delete vlcPersistStorage;
295 delete vlcOleInPlaceActiveObject;
296 delete vlcOleInPlaceObject;
297 delete vlcOleControl;
309 STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
314 if( IID_IUnknown == riid )
315 *ppv = reinterpret_cast<LPVOID>(this);
316 else if( IID_IOleObject == riid )
317 *ppv = reinterpret_cast<LPVOID>(vlcOleObject);
318 else if( IID_IOleControl == riid )
319 *ppv = reinterpret_cast<LPVOID>(vlcOleControl);
320 else if( IID_IOleWindow == riid )
321 *ppv = reinterpret_cast<LPVOID>(vlcOleInPlaceObject);
322 else if( IID_IOleInPlaceObject == riid )
323 *ppv = reinterpret_cast<LPVOID>(vlcOleInPlaceObject);
324 else if( IID_IOleInPlaceActiveObject == riid )
325 *ppv = reinterpret_cast<LPVOID>(vlcOleInPlaceActiveObject);
326 else if( IID_IPersist == riid )
327 *ppv = reinterpret_cast<LPVOID>(vlcPersistPropertyBag);
328 else if( IID_IPersistStreamInit == riid )
329 *ppv = reinterpret_cast<LPVOID>(vlcPersistStreamInit);
330 else if( IID_IPersistStorage == riid )
331 *ppv = reinterpret_cast<LPVOID>(vlcPersistStorage);
332 else if( IID_IPersistPropertyBag == riid )
333 *ppv = reinterpret_cast<LPVOID>(vlcPersistPropertyBag);
334 else if( IID_IProvideClassInfo == riid )
335 *ppv = reinterpret_cast<LPVOID>(vlcProvideClassInfo);
336 else if( IID_IProvideClassInfo2 == riid )
337 *ppv = reinterpret_cast<LPVOID>(vlcProvideClassInfo);
338 else if( IID_IConnectionPointContainer == riid )
339 *ppv = reinterpret_cast<LPVOID>(vlcConnectionPointContainer);
340 else if( IID_IObjectSafety == riid )
341 *ppv = reinterpret_cast<LPVOID>(vlcObjectSafety);
342 else if( IID_IDispatch == riid )
343 *ppv = reinterpret_cast<LPVOID>(vlcControl);
344 else if( IID_IVLCControl == riid )
345 *ppv = reinterpret_cast<LPVOID>(vlcControl);
346 else if( IID_IViewObject == riid )
347 *ppv = reinterpret_cast<LPVOID>(vlcViewObject);
348 else if( IID_IViewObject2 == riid )
349 *ppv = reinterpret_cast<LPVOID>(vlcViewObject);
350 else if( IID_IDataObject == riid )
351 *ppv = reinterpret_cast<LPVOID>(vlcDataObject);
355 return E_NOINTERFACE;
357 ((LPUNKNOWN)*ppv)->AddRef();
361 STDMETHODIMP_(ULONG) VLCPlugin::AddRef(void)
363 return InterlockedIncrement((LONG *)&_i_ref);
366 STDMETHODIMP_(ULONG) VLCPlugin::Release(void)
368 if( ! InterlockedDecrement((LONG *)&_i_ref) )
376 //////////////////////////////////////
379 ** we use a window to represent plugin viewport,
380 ** whose geometry is limited by the clipping rectangle
381 ** all drawing within this window must follow must
382 ** follow coordinates system described in lprPosRect
385 static void getViewportCoords(LPRECT lprPosRect, LPRECT lprClipRect)
388 bounds.right = lprPosRect->right-lprPosRect->left;
390 if( lprClipRect->left <= lprPosRect->left )
392 // left side is not clipped out
395 if( lprClipRect->right >= lprPosRect->right )
397 // right side is not clipped out, no change
399 else if( lprClipRect->right >= lprPosRect->left )
401 // right side is clipped out
402 lprPosRect->right = lprClipRect->right;
406 // outside of clipping rectange, not visible
407 lprPosRect->right = lprPosRect->left;
412 // left side is clipped out
413 bounds.left = lprPosRect->left-lprClipRect->left;
414 bounds.right += bounds.left;
416 lprPosRect->left = lprClipRect->left;
417 if( lprClipRect->right >= lprPosRect->right )
419 // right side is not clipped out
423 // right side is clipped out
424 lprPosRect->right = lprClipRect->right;
428 bounds.bottom = lprPosRect->bottom-lprPosRect->top;
430 if( lprClipRect->top <= lprPosRect->top )
432 // top side is not clipped out
435 if( lprClipRect->bottom >= lprPosRect->bottom )
437 // bottom side is not clipped out, no change
439 else if( lprClipRect->bottom >= lprPosRect->top )
441 // bottom side is clipped out
442 lprPosRect->bottom = lprClipRect->bottom;
446 // outside of clipping rectange, not visible
447 lprPosRect->right = lprPosRect->left;
452 bounds.top = lprPosRect->top-lprClipRect->top;
453 bounds.bottom += bounds.top;
455 lprPosRect->top = lprClipRect->top;
456 if( lprClipRect->bottom >= lprPosRect->bottom )
458 // bottom side is not clipped out
462 // bottom side is clipped out
463 lprPosRect->bottom = lprClipRect->bottom;
466 *lprClipRect = *lprPosRect;
467 *lprPosRect = bounds;
470 HRESULT VLCPlugin::onInit(void)
475 char *ppsz_argv[] = { "vlc", "-vvv", "--fast-mutex", "--win9x-cv-method=1" };
477 char *ppsz_argv[] = { "vlc", "-vv" };
480 DWORD i_type, i_data = MAX_PATH + 1;
481 char p_data[MAX_PATH + 1];
482 if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\VideoLAN\\VLC",
483 0, KEY_READ, &h_key ) == ERROR_SUCCESS )
485 if( RegQueryValueEx( h_key, "InstallDir", 0, &i_type,
486 (LPBYTE)p_data, &i_data ) == ERROR_SUCCESS )
488 if( i_type == REG_SZ )
490 strcat( p_data, "\\vlc" );
491 ppsz_argv[0] = p_data;
494 RegCloseKey( h_key );
498 ppsz_argv[0] = "C:\\cygwin\\home\\Damien_Fouilleul\\dev\\videolan\\vlc-trunk\\vlc";
501 _i_vlc = VLC_Create();
503 if( VLC_Init(_i_vlc, sizeof(ppsz_argv)/sizeof(char*), ppsz_argv) )
511 return CO_E_ALREADYINITIALIZED;
514 HRESULT VLCPlugin::onLoad(void)
517 VLC_VolumeMute(_i_vlc);
519 if( NULL != _psz_src )
521 // add default target to playlist
523 int cOptionsCount = 0;
527 cOptions[cOptionsCount++] = "loop";
529 VLC_AddTarget(_i_vlc, _psz_src, (const char **)&cOptions, cOptionsCount, PLAYLIST_APPEND, PLAYLIST_END);
534 HRESULT VLCPlugin::onClientSiteChanged(LPOLECLIENTSITE pActiveSite)
536 if( NULL != pActiveSite )
539 ** object is embedded in container
540 ** try to activate in place if it has already been initialized
544 vlcOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, pActiveSite, 0, NULL, NULL);
550 HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
557 if( isInPlaceActive() )
559 onInPlaceDeactivate();
561 vlcDataObject->onClose();
569 BOOL VLCPlugin::isInPlaceActive(void)
571 return (NULL != _inplacewnd);
574 HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprcPosRect, LPCRECT lprcClipRect)
576 RECT posRect = *lprcPosRect;
577 RECT clipRect = *lprcClipRect;
580 ** record keeping of control geometry within container
585 ** convert posRect & clipRect to match control viewport coordinates
587 getViewportCoords(&posRect, &clipRect);
590 ** Create a window for in place activated control.
591 ** the window geometry represents the control viewport
592 ** so that embedded video is always properly clipped.
594 _inplacewnd = CreateWindow(_p_class->getInPlaceWndClassName(),
595 "VLC Plugin In-Place Window",
596 WS_CHILD|WS_CLIPCHILDREN|WS_TABSTOP,
599 clipRect.right-clipRect.left,
600 clipRect.bottom-clipRect.top,
603 _p_class->getHInstance(),
607 if( NULL == _inplacewnd )
610 SetWindowLongPtr(_inplacewnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
613 ** VLC embedded video geometry automatically matches parent window.
614 ** hence create a child window so that video position and size
615 ** is always correct relative to the viewport bounds
617 _videownd = CreateWindow(_p_class->getVideoWndClassName(),
618 "VLC Plugin Video Window",
619 WS_CHILD|WS_CLIPCHILDREN|WS_VISIBLE,
622 posRect.right-posRect.left,
623 posRect.bottom-posRect.top,
626 _p_class->getHInstance(),
630 if( NULL == _videownd )
632 DestroyWindow(_inplacewnd);
636 SetWindowLongPtr(_videownd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
639 ShowWindow(_inplacewnd, SW_SHOWNORMAL);
641 /* horrible cast there */
643 val.i_int = reinterpret_cast<int>(_videownd);
644 VLC_VariableSet(_i_vlc, "drawable", val);
646 if( _b_autostart & (VLC_PlaylistNumberOfItems(_i_vlc) > 0) )
654 HRESULT VLCPlugin::onInPlaceDeactivate(void)
659 DestroyWindow(_videownd);
661 DestroyWindow(_inplacewnd);
667 void VLCPlugin::setVisible(BOOL fVisible)
669 _b_visible = fVisible;
670 if( isInPlaceActive() )
671 ShowWindow(_inplacewnd, fVisible ? SW_SHOWNORMAL : SW_HIDE);
672 firePropChangedEvent(DISPID_Visible);
675 void VLCPlugin::setFocus(BOOL fFocus)
678 SetActiveWindow(_inplacewnd);
681 BOOL VLCPlugin::hasFocus(void)
683 return GetActiveWindow() == _inplacewnd;
686 void VLCPlugin::onDraw(DVTARGETDEVICE * ptd, HDC hicTargetDev,
687 HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds)
691 long width = lprcBounds->right-lprcBounds->left;
692 long height = lprcBounds->bottom-lprcBounds->top;
695 if( NULL != hicTargetDev ) {
696 devSize.cx = GetDeviceCaps(hicTargetDev, LOGPIXELSX);
697 devSize.cy = GetDeviceCaps(hicTargetDev, LOGPIXELSY);
699 else if( NULL != (hicTargetDev = CreateDevDC(ptd)) )
701 devSize.cx = GetDeviceCaps(hicTargetDev, LOGPIXELSX);
702 devSize.cy = GetDeviceCaps(hicTargetDev, LOGPIXELSY);
703 DeleteDC(hicTargetDev);
706 RECT bounds = { lprcBounds->left, lprcBounds->top, lprcBounds->right, lprcBounds->bottom };
707 FillRect(hdcDraw, &bounds, (HBRUSH)GetStockObject(WHITE_BRUSH));
709 LPPICTURE pict = getPicture();
712 OLE_XSIZE_HIMETRIC picWidth;
713 OLE_YSIZE_HIMETRIC picHeight;
715 pict->get_Width(&picWidth);
716 pict->get_Height(&picHeight);
718 POINT dstSize = { picWidth*devSize.cx/2540L, picHeight*devSize.cy/2540L };
720 DPtoLP(hdcDraw, &dstSize, 1);
721 if( dstSize.x > width-4 )
723 if( dstSize.y > height-4 )
724 dstSize.y = height-4;
726 long dstX = lprcBounds->left+(width-dstSize.x)/2;
727 long dstY = lprcBounds->top+(height-dstSize.y)/2;
729 if( NULL != lprcWBounds )
731 RECT wBounds = { lprcWBounds->left, lprcWBounds->top, lprcWBounds->right, lprcWBounds->bottom };
732 pict->Render(hdcDraw, dstX, dstY, dstSize.x, dstSize.y,
733 0L, picHeight, picWidth, -picHeight, &wBounds);
736 pict->Render(hdcDraw, dstX, dstY, dstSize.x, dstSize.y,
737 0L, picHeight, picWidth, -picHeight, NULL);
742 SelectObject(hdcDraw, GetStockObject(BLACK_BRUSH));
744 MoveToEx(hdcDraw, bounds.left, bounds.top, NULL);
745 LineTo(hdcDraw, bounds.left+width-1, bounds.top);
746 LineTo(hdcDraw, bounds.left+width-1, bounds.top+height-1);
747 LineTo(hdcDraw, bounds.left, bounds.top+height-1);
748 LineTo(hdcDraw, bounds.left, bounds.top);
752 void VLCPlugin::onPaint(HDC hdc, const RECT &bounds, const RECT &clipRect)
756 /** if VLC is playing, it may not display any VIDEO content
757 ** hence, draw control logo*/
758 HDC hdcPict = CreateCompatibleDC(hdc);
759 if( NULL != hdcPict )
761 int width = bounds.right-bounds.left;
762 int height = bounds.bottom-bounds.top;
763 HBITMAP hBitmap = CreateCompatibleBitmap(hdc, width, height);
764 if( NULL != hBitmap )
766 HBITMAP oldBmp = (HBITMAP)SelectObject(hdcPict, hBitmap);
768 RECTL rcBounds = { bounds.left, bounds.top, bounds.right, bounds.bottom };
770 onDraw(NULL, hdc, hdcPict, &rcBounds, NULL);
772 BitBlt(hdc, bounds.left, bounds.top, width, height,
773 hdcPict, 0, 0, SRCCOPY);
775 SelectObject(hdcPict, oldBmp);
776 DeleteObject(hBitmap);
783 void VLCPlugin::onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
785 RECT clipRect = *lprcClipRect;
786 RECT posRect = *lprcPosRect;
789 ** tell container that previous area needs redrawing
792 InvalidateRect(GetParent(_inplacewnd), &_posRect, TRUE);
795 ** record keeping of control geometry within container
801 ** convert posRect & clipRect to match control viewport coordinates
803 getViewportCoords(&posRect, &clipRect);
806 ** change in-place window geometry to match clipping region
808 MoveWindow(_inplacewnd,
811 clipRect.right-clipRect.left,
812 clipRect.bottom-clipRect.top,
816 ** change video window geometry to match object bounds within clipping region
818 MoveWindow(_videownd,
821 posRect.right-posRect.left,
822 posRect.bottom-posRect.top,
826 ** force a full refresh of control content
829 updateRect.left = -posRect.left;
830 updateRect.top = -posRect.top;
831 updateRect.right = posRect.right-posRect.left;
832 updateRect.bottom = posRect.bottom-posRect.top;
834 ValidateRect(_videownd, NULL);
835 InvalidateRect(_videownd, &updateRect, FALSE);
836 UpdateWindow(_videownd);
839 void VLCPlugin::freezeEvents(BOOL freeze)
841 vlcConnectionPointContainer->freezeEvents(freeze);
844 void VLCPlugin::firePropChangedEvent(DISPID dispid)
846 vlcConnectionPointContainer->firePropChangedEvent(dispid);
849 void VLCPlugin::fireOnPlayEvent(void)
851 DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
852 vlcConnectionPointContainer->fireEvent(DISPID_PlayEvent, &dispparamsNoArgs);
855 void VLCPlugin::fireOnPauseEvent(void)
857 DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
858 vlcConnectionPointContainer->fireEvent(DISPID_PauseEvent, &dispparamsNoArgs);
861 void VLCPlugin::fireOnStopEvent(void)
863 DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
864 vlcConnectionPointContainer->fireEvent(DISPID_StopEvent, &dispparamsNoArgs);