]> git.sesse.net Git - vlc/commitdiff
- ActiveX: support for libvlc and common scripting APIS, widl has replaced midl as...
authorDamien Fouilleul <damienf@videolan.org>
Thu, 14 Sep 2006 19:44:47 +0000 (19:44 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Thu, 14 Sep 2006 19:44:47 +0000 (19:44 +0000)
15 files changed:
activex/Makefile.am
activex/axvlc.idl
activex/axvlc.tlb
activex/axvlc_idl.c
activex/axvlc_idl.h
activex/guiddef.h [new file with mode: 0755]
activex/main.cpp
activex/plugin.cpp
activex/plugin.h
activex/utils.cpp
activex/utils.h
activex/vlccontrol.cpp
activex/vlccontrol.h
activex/vlccontrol2.cpp [new file with mode: 0755]
activex/vlccontrol2.h [new file with mode: 0755]

index 4c2004411ae4317780fe45586be8fe9a965b5f84..bd98a95ac2a1ae3785999e65bb93fe45afa6bf52 100644 (file)
@@ -38,6 +38,8 @@ SOURCES_activex = \
     viewobject.h \
     vlccontrol.cpp \
     vlccontrol.h \
+    vlccontrol2.cpp \
+    vlccontrol2.h \
     plugin.cpp \
     plugin.h \
     axvlc_idl.c \
@@ -100,10 +102,20 @@ axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
 clean-tlb:
        rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
 
+else
+if HAS_WIDL_COMPILER
+
+axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
+       $(WIDL) -I$(WINE_SDK_PATH)/include -tuh -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h axvlc.idl
+
+clean-tlb:
+       rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
+
 else
 
 clean-tlb:
 
+endif
 endif
 
 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
@@ -125,14 +137,13 @@ endif
 clean-stamp:
        rm -f stamp-pic
 
-stamp-pic: FORCE
-       @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
-         if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \
-           rm -f $@; \
-           break; \
-         fi; \
-       done
-       @if test ! -f $@; then printf "" > $@; fi
+if BUILD_SHARED
+stamp-pic:
+else
+stamp-pic: $(shell $(VLC_CONFIG) --target builtin)
+endif
+       @touch $@
+
 
 ###############################################################################
 # Clean rules
@@ -142,7 +153,6 @@ clean-local: clean-stamp clean-tlb
        rm -f axvlc$(LIBEXT)
 
 ###############################################################################
-# Force rule
+# Force rules
 ###############################################################################
-FORCE:
 
index 9f55ba495626e2505dc51fd3e7ea98cfb1dcde62..bd82f11d9d1d47f09e7f375045809398375285c1 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************\r
  * axvlc.idl: ActiveX control for VLC\r
  *****************************************************************************\r
- * Copyright (C) 2005 the VideoLAN team\r
+ * Copyright (C) 2006 the VideoLAN team\r
  *\r
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
  *\r
 //comments terminated by [t] are by tonsofpcs, regarding the string review.  April 02, 2006. [t]\r
 //Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]\r
 \r
+import "oaidl.idl";\r
+\r
 [\r
   uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),\r
   version(1.0),\r
-  helpstring("VideoLAN VLC ActiveX Plugin"),\r
+  helpstring("VideoLAN VLC ActiveX Plugin")\r
 ]\r
 library AXVLC\r
 {\r
-    importlib("stdole2.tlb");\r
-\r
     // Forward declare all types defined in this typelib\r
     interface IVLCControl;\r
+    interface IVLCPlaylist;\r
+    interface ILibVLCControl;\r
     dispinterface DVLCEvents;\r
 \r
+    importlib("stdole2.tlb");\r
+\r
     enum VLCPlaylistMode\r
     {\r
         VLCPlayListInsert       =  1,\r
@@ -64,7 +68,7 @@ library AXVLC
     [\r
       odl,\r
       uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),\r
-      helpstring("VLC Control"),\r
+      helpstring("VLC Control (deprecated)"),\r
       dual,\r
       hidden,\r
       oleautomation\r
@@ -166,14 +170,173 @@ library AXVLC
             void stop();\r
     };\r
 \r
+    [\r
+      odl,\r
+      uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),\r
+      helpstring("VLC Audio APIs"),\r
+      dual,\r
+      oleautomation\r
+    ]\r
+    interface IVLCAudio : IDispatch\r
+    {\r
+        [propget, helpstring("Returns/sets the audio mute state.")]\r
+        HRESULT mute([out, retval] VARIANT_BOOL* muted);\r
+        [propput, helpstring("Returns/sets the audio mute state.")]\r
+        HRESULT mute([in] VARIANT_BOOL muted);\r
+\r
+        [propget, helpstring("Returns/sets audio volume as a percent value.")]\r
+        HRESULT volume([out, retval] int* volume);\r
+        [propput, helpstring("Returns/sets audio volume as a percent value.")]\r
+        HRESULT volume([in] int volume);\r
+\r
+        [helpstring("Mute/unmute audio playback.")]\r
+        HRESULT toggleMute();\r
+    };\r
+\r
+    [\r
+      odl,\r
+      uuid(49E0DBD1-9440-466C-9C97-95C67190C603),\r
+      helpstring("VLC Input APIs"),\r
+      dual,\r
+      oleautomation\r
+    ]\r
+    interface IVLCInput : IDispatch\r
+    {\r
+        [propget, helpstring("Returns the clip length, in milliseconds.")]\r
+        HRESULT length([out, retval] __int64* length);\r
+\r
+        [propget, helpstring("Returns/sets playback position in current clip.  Position is ranging from 0.0 to 1.0.")]\r
+        HRESULT position([out, retval] float* position);\r
+        [propput, helpstring("Returns/sets playback position in the current clip.  Position ranging from 0.0 to 1.0.")]\r
+        HRESULT position([in] float position);\r
+\r
+        [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]\r
+        HRESULT time([out, retval] __int64* time);\r
+        [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]\r
+        HRESULT time([in] __int64 time);\r
+\r
+        [propget, helpstring("Returns current playback state.")]\r
+        HRESULT state([out, retval] int* state);\r
+\r
+        [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]\r
+        HRESULT rate([out, retval] float* rate);\r
+        [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]\r
+        HRESULT rate([in] float rate);\r
+\r
+        [propget, helpstring("Returns current playback frames per seconds if available.")]\r
+        HRESULT fps([out, retval] float* fps);\r
+\r
+        [propget, helpstring("Returns whether current playback displays video.")]\r
+        HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);\r
+    };\r
+\r
+    [\r
+      odl,\r
+      uuid(54613049-40BF-4035-9E70-0A9312C0188D),\r
+      helpstring("VLC Playlist APIs"),\r
+      dual,\r
+      oleautomation\r
+    ]\r
+    interface IVLCPlaylist : IDispatch\r
+    {\r
+        [propget, helpstring("Returns number of items in playlist.")]\r
+        HRESULT itemCount([out, retval] int* count);\r
+\r
+        [propget, helpstring("Returns whether playback displays video.")]\r
+        HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);\r
+\r
+        [helpstring("Add a playlist item.")]\r
+        HRESULT add([in] BSTR uri, [in] BSTR name, [in, optional] VARIANT options, [out, retval] int* item);\r
+\r
+        [helpstring("Play/Resume the playlist.")]\r
+        HRESULT play();\r
+\r
+        [helpstring("Play item in playlist.")]\r
+        HRESULT playItem([in] int item);\r
+\r
+        [helpstring("Play/Pause current clip.")]\r
+        HRESULT togglePause();\r
+\r
+        [helpstring("Stop current clip.")]\r
+        HRESULT stop();\r
+\r
+        [helpstring("Advance to next item in playlist.")]\r
+        HRESULT next();\r
+\r
+        [helpstring("Advance to previous item in playlist.")]\r
+        HRESULT prev();\r
+\r
+        [helpstring("Remove all items from playlist.")]\r
+        HRESULT clear();\r
+\r
+        [helpstring("remove item from playlist.")]\r
+        HRESULT removeItem([in] int item);\r
+    };\r
+\r
+    [\r
+      odl,\r
+      uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),\r
+      helpstring("VLC Video APIs"),\r
+      dual,\r
+      oleautomation\r
+    ]\r
+    interface IVLCVideo : IDispatch\r
+    {\r
+        [propget, helpstring("Returns/sets the fullscreen state.")]\r
+        HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);\r
+        [propput, helpstring("Returns/sets the fullscreen state.")]\r
+        HRESULT fullscreen([in] VARIANT_BOOL fullscreen);\r
+\r
+        [propget, helpstring("Returns video original width.")]\r
+        HRESULT width([out, retval] int* width);\r
+\r
+        [propget, helpstring("Returns video original height.")]\r
+        HRESULT height([out, retval] int* height);\r
+    };\r
+\r
+    [\r
+      odl,\r
+      uuid(2D719729-5333-406C-BF12-8DE787FD65E3),\r
+      helpstring("VLC Control"),\r
+      dual,\r
+      oleautomation\r
+    ]\r
+    interface IVLCControl2 : IDispatch\r
+    {\r
+        [propget, helpstring("Returns the audio object.")]\r
+        HRESULT audio([out, retval] IVLCAudio** obj);\r
+\r
+        [propget, helpstring("Returns the audio object.")]\r
+        HRESULT input([out, retval] IVLCInput** obj);\r
+\r
+        [propget, helpstring("Returns the playlist object.")]\r
+        HRESULT playlist([out, retval] IVLCPlaylist** obj);\r
+\r
+        [propget, helpstring("Returns the audio object.")]\r
+        HRESULT video([out, retval] IVLCVideo** obj);\r
+    };\r
+\r
     [\r
       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
-      helpstring("VLC control"),\r
+      helpstring("VLC control (deprecated)"),\r
       control\r
     ]\r
     coclass VLCPlugin\r
     {\r
         [default] interface IVLCControl;\r
+        interface IVLCControl2;\r
+        [default, source] dispinterface DVLCEvents;\r
+    };\r
+\r
+    [\r
+      uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),\r
+      helpstring("VLC control"),\r
+      control\r
+    ]\r
+    coclass VLCPlugin2\r
+    {\r
+        [default] interface IVLCControl2;\r
+        interface IVLCControl;\r
         [default, source] dispinterface DVLCEvents;\r
     };\r
 };\r
index 0aff1ce47703183f35600bed0dd7de52457308df..1d4771d930d228a72e3e191a788112fde3943a50 100644 (file)
Binary files a/activex/axvlc.tlb and b/activex/axvlc.tlb differ
index 0abe27bc7cfda98c2344cef97044ab1848770a22..b2cba3e9c679e58c51e6bf2bbab4e33d04e5ca21 100644 (file)
@@ -1,53 +1,26 @@
-/* this file contains the actual definitions of */
-/* the IIDs and CLSIDs */
+/*** Autogenerated by WIDL 0.9.20 from axvlc.idl - Do not edit ***/
 
-/* link this file in with the server and any clients */
+#include <rpc.h>
+#include <rpcndr.h>
 
+#define INITGUID
+#include <guiddef.h>
 
-/* File created by MIDL compiler version 5.01.0164 */
-/* at Sun Apr 02 19:22:45 2006
- */
-/* Compiler settings for axvlc.idl:
-    Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
-    error checks: allocation ref bounds_check enum stub_data 
-*/
-//@@MIDL_FILE_HEADING(  )
 #ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-#ifndef __IID_DEFINED__
-#define __IID_DEFINED__
-
-typedef struct _IID
-{
-    unsigned long x;
-    unsigned short s1;
-    unsigned short s2;
-    unsigned char  c[8];
-} IID;
-
-#endif // __IID_DEFINED__
-
-#ifndef CLSID_DEFINED
-#define CLSID_DEFINED
-typedef IID CLSID;
-#endif // CLSID_DEFINED
-
-const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}};
-
-
-const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}};
-
-
-const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}};
-
-
-const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}};
+extern "C" {
+#endif
 
+DEFINE_GUID(LIBID_AXVLC, 0xdf2bbe39, 0x40a8, 0x433b, 0xa2,0x79, 0x07,0x3f,0x48,0xda,0x94,0xb6);
+DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x49,0x99,0xc1,0xc1);
+DEFINE_GUID(DIID_DVLCEvents, 0xdf48072f, 0x5ef8, 0x434e, 0x9b,0x40, 0xe2,0xf3,0xae,0x75,0x9b,0x5f);
+DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f,0x3f,0xd9,0xd4);
+DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
+DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
+DEFINE_GUID(IID_IVLCVideo, 0x0aaedf0b, 0xd333, 0x4b27, 0xa0,0xc6, 0xbb,0xf3,0x14,0x13,0xa4,0x2e);
+DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
+DEFINE_GUID(CLSID_VLCPlugin, 0xe23fe9c6, 0x778e, 0x49d4, 0xb5,0x37, 0x38,0xfc,0xde,0x48,0x87,0xd8);
+DEFINE_GUID(CLSID_VLCPlugin2, 0x9be31822, 0xfdad, 0x461b, 0xad,0x51, 0xbe,0x1d,0x1c,0x15,0x99,0x21);
 
 #ifdef __cplusplus
 }
 #endif
-
index 518e2cd11aef1228145a6dd90f7a4affa478acf5..da2a22da94e8024f03035c66f373907aee53cda2 100644 (file)
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
-/* File created by MIDL compiler version 5.01.0164 */
-/* at Sun Apr 02 19:22:45 2006
- */
-/* Compiler settings for axvlc.idl:
-    Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
-    error checks: allocation ref bounds_check enum stub_data 
-*/
-//@@MIDL_FILE_HEADING(  )
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 440
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __axvlc_idl_h__
-#define __axvlc_idl_h__
+/*** Autogenerated by WIDL 0.9.20 from axvlc.idl - Do not edit ***/
+#include <rpc.h>
+#include <rpcndr.h>
 
+#ifndef __WIDL_AXVLC_IDL_H
+#define __WIDL_AXVLC_IDL_H
 #ifdef __cplusplus
-extern "C"{
-#endif 
+extern "C" {
+#endif
+#include <oaidl.h>
 
-/* Forward Declarations */ 
+DEFINE_GUID(LIBID_AXVLC, 0xdf2bbe39, 0x40a8, 0x433b, 0xa2,0x79, 0x07,0x3f,0x48,0xda,0x94,0xb6);
 
 #ifndef __IVLCControl_FWD_DEFINED__
 #define __IVLCControl_FWD_DEFINED__
 typedef interface IVLCControl IVLCControl;
-#endif         /* __IVLCControl_FWD_DEFINED__ */
+#endif
 
+#ifndef __IVLCPlaylist_FWD_DEFINED__
+#define __IVLCPlaylist_FWD_DEFINED__
+typedef interface IVLCPlaylist IVLCPlaylist;
+#endif
+
+#ifndef __ILibVLCControl_FWD_DEFINED__
+#define __ILibVLCControl_FWD_DEFINED__
+typedef interface ILibVLCControl ILibVLCControl;
+#endif
 
 #ifndef __DVLCEvents_FWD_DEFINED__
 #define __DVLCEvents_FWD_DEFINED__
 typedef interface DVLCEvents DVLCEvents;
-#endif         /* __DVLCEvents_FWD_DEFINED__ */
-
-
-#ifndef __VLCPlugin_FWD_DEFINED__
-#define __VLCPlugin_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class VLCPlugin VLCPlugin;
-#else
-typedef struct VLCPlugin VLCPlugin;
-#endif /* __cplusplus */
-
-#endif         /* __VLCPlugin_FWD_DEFINED__ */
-
-
-void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
-void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 
-
-
-#ifndef __AXVLC_LIBRARY_DEFINED__
-#define __AXVLC_LIBRARY_DEFINED__
-
-/* library AXVLC */
-/* [helpstring][version][uuid] */ 
-
-
-
-
-enum VLCPlaylistMode
-    {  VLCPlayListInsert       = 1,
-       VLCPlayListInsertAndGo  = 9,
-       VLCPlayListReplace      = 2,
-       VLCPlayListReplaceAndGo = 10,
-       VLCPlayListAppend       = 4,
-       VLCPlayListAppendAndGo  = 12,
-       VLCPlayListCheckInsert  = 16
-    };
-#define        VLCPlayListEnd  ( -666 )
-
-#define        DISPID_Visible  ( 100 )
-
-#define        DISPID_Playing  ( 101 )
-
-#define        DISPID_Position ( 102 )
+#endif
 
-#define        DISPID_Time     ( 103 )
+enum VLCPlaylistMode {
+    VLCPlayListInsert = 1,
+    VLCPlayListInsertAndGo = 9,
+    VLCPlayListReplace = 2,
+    VLCPlayListReplaceAndGo = 10,
+    VLCPlayListAppend = 4,
+    VLCPlayListAppendAndGo = 12,
+    VLCPlayListCheckInsert = 16
+};
 
-#define        DISPID_Length   ( 104 )
+#define VLCPlayListEnd (-666)
 
-#define        DISPID_Volume   ( 105 )
+#define DISPID_Visible (100)
 
-#define        DISPID_MRL      ( 106 )
+#define DISPID_Playing (101)
 
-#define        DISPID_AutoPlay ( 107 )
+#define DISPID_Position (102)
 
-#define        DISPID_AutoLoop ( 108 )
+#define DISPID_Time (103)
 
-#define        DISPID_PlayEvent        ( 100 )
+#define DISPID_Length (104)
 
-#define        DISPID_PauseEvent       ( 101 )
+#define DISPID_Volume (105)
 
-#define        DISPID_StopEvent        ( 102 )
+#define DISPID_MRL (106)
 
+#define DISPID_AutoPlay (107)
 
-EXTERN_C const IID LIBID_AXVLC;
+#define DISPID_AutoLoop (108)
 
+/*****************************************************************************
+ * IVLCControl interface
+ */
 #ifndef __IVLCControl_INTERFACE_DEFINED__
 #define __IVLCControl_INTERFACE_DEFINED__
 
-/* interface IVLCControl */
-/* [object][oleautomation][hidden][dual][helpstring][uuid] */ 
-
-
-EXTERN_C const IID IID_IVLCControl;
-
+DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x49,0x99,0xc1,0xc1);
 #if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C2FA41D0-B113-476e-AC8C-9BD14999C1C1")
-    IVLCControl : public IDispatch
-    {
-    public:
-        virtual /* [helpstring][bindable][propget][id] */ HRESULT STDMETHODCALLTYPE get_Visible( 
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible) = 0;
-        
-        virtual /* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE put_Visible( 
-            /* [in] */ VARIANT_BOOL visible) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE play( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE pause( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE stop( void) = 0;
-        
-        virtual /* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE get_Playing( 
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Position( 
-            /* [retval][out] */ float __RPC_FAR *position) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Position( 
-            /* [in] */ float position) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Time( 
-            /* [retval][out] */ int __RPC_FAR *seconds) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Time( 
-            /* [in] */ int seconds) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE shuttle( 
-            /* [in] */ int seconds) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE fullscreen( void) = 0;
-        
-        virtual /* [helpstring][hidden][propget][id] */ HRESULT STDMETHODCALLTYPE get_Length( 
-            /* [retval][out] */ int __RPC_FAR *seconds) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playFaster( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playSlower( void) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Volume( 
-            /* [retval][out] */ int __RPC_FAR *volume) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Volume( 
-            /* [in] */ int volume) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleMute( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE setVariable( 
-            /* [in] */ BSTR name,
-            /* [in] */ VARIANT value) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE getVariable( 
-            /* [in] */ BSTR name,
-            /* [retval][out] */ VARIANT __RPC_FAR *value) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE addTarget( 
-            /* [in] */ BSTR uri,
-            /* [in] */ VARIANT options,
-            /* [in] */ enum VLCPlaylistMode mode,
-            /* [in] */ int position) = 0;
-        
-        virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PlaylistIndex( 
-            /* [retval][out] */ int __RPC_FAR *index) = 0;
-        
-        virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PlaylistCount( 
-            /* [retval][out] */ int __RPC_FAR *index) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistNext( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistPrev( void) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistClear( void) = 0;
-        
-        virtual /* [helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_VersionInfo( 
-            /* [retval][out] */ BSTR __RPC_FAR *version) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_MRL( 
-            /* [retval][out] */ BSTR __RPC_FAR *mrl) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_MRL( 
-            /* [in] */ BSTR mrl) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoPlay( 
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoplay) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoPlay( 
-            /* [in] */ VARIANT_BOOL autoplay) = 0;
-        
-        virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoLoop( 
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoloop) = 0;
-        
-        virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoLoop( 
-            /* [in] */ VARIANT_BOOL autoloop) = 0;
-        
-    };
-    
-#else  /* C style interface */
-
-    typedef struct IVLCControlVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
-            IVLCControl __RPC_FAR * This);
-        
-        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
-            IVLCControl __RPC_FAR * This);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( 
-            IVLCControl __RPC_FAR * This,
-            /* [out] */ UINT __RPC_FAR *pctinfo);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ UINT iTInfo,
-            /* [in] */ LCID lcid,
-            /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ REFIID riid,
-            /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
-            /* [in] */ UINT cNames,
-            /* [in] */ LCID lcid,
-            /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ DISPID dispIdMember,
-            /* [in] */ REFIID riid,
-            /* [in] */ LCID lcid,
-            /* [in] */ WORD wFlags,
-            /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
-            /* [out] */ VARIANT __RPC_FAR *pVarResult,
-            /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
-            /* [out] */ UINT __RPC_FAR *puArgErr);
-        
-        /* [helpstring][bindable][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Visible )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible);
-        
-        /* [helpstring][bindable][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Visible )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ VARIANT_BOOL visible);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *play )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *pause )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *stop )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring][propget][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Playing )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Position )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ float __RPC_FAR *position);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Position )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ float position);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Time )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ int __RPC_FAR *seconds);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Time )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ int seconds);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *shuttle )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ int seconds);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *fullscreen )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring][hidden][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Length )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ int __RPC_FAR *seconds);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playFaster )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playSlower )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Volume )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ int __RPC_FAR *volume);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Volume )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ int volume);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *toggleMute )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *setVariable )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ BSTR name,
-            /* [in] */ VARIANT value);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *getVariable )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ BSTR name,
-            /* [retval][out] */ VARIANT __RPC_FAR *value);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *addTarget )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ BSTR uri,
-            /* [in] */ VARIANT options,
-            /* [in] */ enum VLCPlaylistMode mode,
-            /* [in] */ int position);
-        
-        /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_PlaylistIndex )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ int __RPC_FAR *index);
-        
-        /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_PlaylistCount )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ int __RPC_FAR *index);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playlistNext )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playlistPrev )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playlistClear )( 
-            IVLCControl __RPC_FAR * This);
-        
-        /* [helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_VersionInfo )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ BSTR __RPC_FAR *version);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_MRL )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ BSTR __RPC_FAR *mrl);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_MRL )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ BSTR mrl);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_AutoPlay )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoplay);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_AutoPlay )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ VARIANT_BOOL autoplay);
-        
-        /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_AutoLoop )( 
-            IVLCControl __RPC_FAR * This,
-            /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoloop);
-        
-        /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_AutoLoop )( 
-            IVLCControl __RPC_FAR * This,
-            /* [in] */ VARIANT_BOOL autoloop);
-        
-        END_INTERFACE
-    } IVLCControlVtbl;
-
-    interface IVLCControl
-    {
-        CONST_VTBL struct IVLCControlVtbl __RPC_FAR *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IVLCControl_QueryInterface(This,riid,ppvObject)        \
-    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
-
-#define IVLCControl_AddRef(This)       \
-    (This)->lpVtbl -> AddRef(This)
+interface IVLCControl : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_Visible(
+        VARIANT_BOOL* visible) = 0;
 
-#define IVLCControl_Release(This)      \
-    (This)->lpVtbl -> Release(This)
+    virtual HRESULT STDMETHODCALLTYPE put_Visible(
+        VARIANT_BOOL visible) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE play(
+        ) = 0;
 
-#define IVLCControl_GetTypeInfoCount(This,pctinfo)     \
-    (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+    virtual HRESULT STDMETHODCALLTYPE pause(
+        ) = 0;
 
-#define IVLCControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo)      \
-    (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+    virtual HRESULT STDMETHODCALLTYPE stop(
+        ) = 0;
 
-#define IVLCControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)    \
-    (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+    virtual HRESULT STDMETHODCALLTYPE get_Playing(
+        VARIANT_BOOL* isPlaying) = 0;
 
-#define IVLCControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)      \
-    (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+    virtual HRESULT STDMETHODCALLTYPE get_Position(
+        float* position) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE put_Position(
+        float position) = 0;
 
-#define IVLCControl_get_Visible(This,visible)  \
-    (This)->lpVtbl -> get_Visible(This,visible)
+    virtual HRESULT STDMETHODCALLTYPE get_Time(
+        int* seconds) = 0;
 
-#define IVLCControl_put_Visible(This,visible)  \
-    (This)->lpVtbl -> put_Visible(This,visible)
+    virtual HRESULT STDMETHODCALLTYPE put_Time(
+        int seconds) = 0;
 
-#define IVLCControl_play(This) \
-    (This)->lpVtbl -> play(This)
+    virtual HRESULT STDMETHODCALLTYPE shuttle(
+        int seconds) = 0;
 
-#define IVLCControl_pause(This)        \
-    (This)->lpVtbl -> pause(This)
+    virtual HRESULT STDMETHODCALLTYPE fullscreen(
+        ) = 0;
 
-#define IVLCControl_stop(This) \
-    (This)->lpVtbl -> stop(This)
+    virtual HRESULT STDMETHODCALLTYPE get_Length(
+        int* seconds) = 0;
 
-#define IVLCControl_get_Playing(This,isPlaying)        \
-    (This)->lpVtbl -> get_Playing(This,isPlaying)
+    virtual HRESULT STDMETHODCALLTYPE playFaster(
+        ) = 0;
 
-#define IVLCControl_get_Position(This,position)        \
-    (This)->lpVtbl -> get_Position(This,position)
+    virtual HRESULT STDMETHODCALLTYPE playSlower(
+        ) = 0;
 
-#define IVLCControl_put_Position(This,position)        \
-    (This)->lpVtbl -> put_Position(This,position)
+    virtual HRESULT STDMETHODCALLTYPE get_Volume(
+        int* volume) = 0;
 
-#define IVLCControl_get_Time(This,seconds)     \
-    (This)->lpVtbl -> get_Time(This,seconds)
+    virtual HRESULT STDMETHODCALLTYPE put_Volume(
+        int volume) = 0;
 
-#define IVLCControl_put_Time(This,seconds)     \
-    (This)->lpVtbl -> put_Time(This,seconds)
+    virtual HRESULT STDMETHODCALLTYPE toggleMute(
+        ) = 0;
 
-#define IVLCControl_shuttle(This,seconds)      \
-    (This)->lpVtbl -> shuttle(This,seconds)
+    virtual HRESULT STDMETHODCALLTYPE setVariable(
+        BSTR name,
+        VARIANT value) = 0;
 
-#define IVLCControl_fullscreen(This)   \
-    (This)->lpVtbl -> fullscreen(This)
+    virtual HRESULT STDMETHODCALLTYPE getVariable(
+        BSTR name,
+        VARIANT* value) = 0;
 
-#define IVLCControl_get_Length(This,seconds)   \
-    (This)->lpVtbl -> get_Length(This,seconds)
+    virtual HRESULT STDMETHODCALLTYPE addTarget(
+        BSTR uri,
+        VARIANT options,
+        enum VLCPlaylistMode mode,
+        int position) = 0;
 
-#define IVLCControl_playFaster(This)   \
-    (This)->lpVtbl -> playFaster(This)
+    virtual HRESULT STDMETHODCALLTYPE get_PlaylistIndex(
+        int* index) = 0;
 
-#define IVLCControl_playSlower(This)   \
-    (This)->lpVtbl -> playSlower(This)
+    virtual HRESULT STDMETHODCALLTYPE get_PlaylistCount(
+        int* index) = 0;
 
-#define IVLCControl_get_Volume(This,volume)    \
-    (This)->lpVtbl -> get_Volume(This,volume)
+    virtual HRESULT STDMETHODCALLTYPE playlistNext(
+        ) = 0;
 
-#define IVLCControl_put_Volume(This,volume)    \
-    (This)->lpVtbl -> put_Volume(This,volume)
+    virtual HRESULT STDMETHODCALLTYPE playlistPrev(
+        ) = 0;
 
-#define IVLCControl_toggleMute(This)   \
-    (This)->lpVtbl -> toggleMute(This)
+    virtual HRESULT STDMETHODCALLTYPE playlistClear(
+        ) = 0;
 
-#define IVLCControl_setVariable(This,name,value)       \
-    (This)->lpVtbl -> setVariable(This,name,value)
+    virtual HRESULT STDMETHODCALLTYPE get_VersionInfo(
+        BSTR* version) = 0;
 
-#define IVLCControl_getVariable(This,name,value)       \
-    (This)->lpVtbl -> getVariable(This,name,value)
+    virtual HRESULT STDMETHODCALLTYPE get_MRL(
+        BSTR* mrl) = 0;
 
-#define IVLCControl_addTarget(This,uri,options,mode,position)  \
-    (This)->lpVtbl -> addTarget(This,uri,options,mode,position)
+    virtual HRESULT STDMETHODCALLTYPE put_MRL(
+        BSTR mrl) = 0;
 
-#define IVLCControl_get_PlaylistIndex(This,index)      \
-    (This)->lpVtbl -> get_PlaylistIndex(This,index)
+    virtual HRESULT STDMETHODCALLTYPE get_AutoPlay(
+        VARIANT_BOOL* autoplay) = 0;
 
-#define IVLCControl_get_PlaylistCount(This,index)      \
-    (This)->lpVtbl -> get_PlaylistCount(This,index)
+    virtual HRESULT STDMETHODCALLTYPE put_AutoPlay(
+        VARIANT_BOOL autoplay) = 0;
 
-#define IVLCControl_playlistNext(This) \
-    (This)->lpVtbl -> playlistNext(This)
+    virtual HRESULT STDMETHODCALLTYPE get_AutoLoop(
+        VARIANT_BOOL* autoloop) = 0;
 
-#define IVLCControl_playlistPrev(This) \
-    (This)->lpVtbl -> playlistPrev(This)
+    virtual HRESULT STDMETHODCALLTYPE put_AutoLoop(
+        VARIANT_BOOL autoloop) = 0;
 
-#define IVLCControl_playlistClear(This)        \
-    (This)->lpVtbl -> playlistClear(This)
-
-#define IVLCControl_get_VersionInfo(This,version)      \
-    (This)->lpVtbl -> get_VersionInfo(This,version)
-
-#define IVLCControl_get_MRL(This,mrl)  \
-    (This)->lpVtbl -> get_MRL(This,mrl)
+};
+#else
+typedef struct IVLCControlVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCControl* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCControl* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCControl* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCControl* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCControl* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCControl* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCControl* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCControl methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_Visible)(
+        IVLCControl* This,
+        VARIANT_BOOL* visible);
+
+    HRESULT (STDMETHODCALLTYPE *put_Visible)(
+        IVLCControl* This,
+        VARIANT_BOOL visible);
+
+    HRESULT (STDMETHODCALLTYPE *play)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *pause)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *stop)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *get_Playing)(
+        IVLCControl* This,
+        VARIANT_BOOL* isPlaying);
+
+    HRESULT (STDMETHODCALLTYPE *get_Position)(
+        IVLCControl* This,
+        float* position);
+
+    HRESULT (STDMETHODCALLTYPE *put_Position)(
+        IVLCControl* This,
+        float position);
+
+    HRESULT (STDMETHODCALLTYPE *get_Time)(
+        IVLCControl* This,
+        int* seconds);
+
+    HRESULT (STDMETHODCALLTYPE *put_Time)(
+        IVLCControl* This,
+        int seconds);
+
+    HRESULT (STDMETHODCALLTYPE *shuttle)(
+        IVLCControl* This,
+        int seconds);
+
+    HRESULT (STDMETHODCALLTYPE *fullscreen)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *get_Length)(
+        IVLCControl* This,
+        int* seconds);
+
+    HRESULT (STDMETHODCALLTYPE *playFaster)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *playSlower)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *get_Volume)(
+        IVLCControl* This,
+        int* volume);
+
+    HRESULT (STDMETHODCALLTYPE *put_Volume)(
+        IVLCControl* This,
+        int volume);
+
+    HRESULT (STDMETHODCALLTYPE *toggleMute)(
+        IVLCControl* This);
+
+    HRESULT (STDMETHODCALLTYPE *setVariable)(
+        IVLCControl* This,
+        BSTR name,
+        VARIANT value);
+
+    HRESULT (STDMETHODCALLTYPE *getVariable)(
+        IVLCControl* This,
+        BSTR name,
+        VARIANT* value);
+
+    HRESULT (STDMETHODCALLTYPE *addTarget)(
+        IVLCControl* This,
+        BSTR uri,
+        VARIANT options,
+        enum VLCPlaylistMode mode,
+        int position);
+
+    HRESULT (STDMETHODCALLTYPE *get_PlaylistIndex)(
+        IVLCControl* This,
+        int* index);
+
+    HRESULT (STDMETHODCALLTYPE *get_PlaylistCount)(
+        IVLCControl* This,
+        int* index);
+
+    HRESULT (STDMETHODCALLTYPE *playlistNext)(
+        IVLCControl* This);
 
-#define IVLCControl_put_MRL(This,mrl)  \
-    (This)->lpVtbl -> put_MRL(This,mrl)
+    HRESULT (STDMETHODCALLTYPE *playlistPrev)(
+        IVLCControl* This);
 
-#define IVLCControl_get_AutoPlay(This,autoplay)        \
-    (This)->lpVtbl -> get_AutoPlay(This,autoplay)
+    HRESULT (STDMETHODCALLTYPE *playlistClear)(
+        IVLCControl* This);
 
-#define IVLCControl_put_AutoPlay(This,autoplay)        \
-    (This)->lpVtbl -> put_AutoPlay(This,autoplay)
+    HRESULT (STDMETHODCALLTYPE *get_VersionInfo)(
+        IVLCControl* This,
+        BSTR* version);
 
-#define IVLCControl_get_AutoLoop(This,autoloop)        \
-    (This)->lpVtbl -> get_AutoLoop(This,autoloop)
+    HRESULT (STDMETHODCALLTYPE *get_MRL)(
+        IVLCControl* This,
+        BSTR* mrl);
 
-#define IVLCControl_put_AutoLoop(This,autoloop)        \
-    (This)->lpVtbl -> put_AutoLoop(This,autoloop)
+    HRESULT (STDMETHODCALLTYPE *put_MRL)(
+        IVLCControl* This,
+        BSTR mrl);
 
-#endif /* COBJMACROS */
+    HRESULT (STDMETHODCALLTYPE *get_AutoPlay)(
+        IVLCControl* This,
+        VARIANT_BOOL* autoplay);
 
+    HRESULT (STDMETHODCALLTYPE *put_AutoPlay)(
+        IVLCControl* This,
+        VARIANT_BOOL autoplay);
 
-#endif         /* C style interface */
+    HRESULT (STDMETHODCALLTYPE *get_AutoLoop)(
+        IVLCControl* This,
+        VARIANT_BOOL* autoloop);
 
+    HRESULT (STDMETHODCALLTYPE *put_AutoLoop)(
+        IVLCControl* This,
+        VARIANT_BOOL autoloop);
 
+    END_INTERFACE
+} IVLCControlVtbl;
+interface IVLCControl {
+    const IVLCControlVtbl* lpVtbl;
+};
 
-/* [helpstring][bindable][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Visible_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible);
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCControl_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCControl_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCControl_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCControl_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCControl_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCControl_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCControl methods ***/
+#define IVLCControl_get_Visible(p,a) (p)->lpVtbl->get_Visible(p,a)
+#define IVLCControl_put_Visible(p,a) (p)->lpVtbl->put_Visible(p,a)
+#define IVLCControl_play(p) (p)->lpVtbl->play(p)
+#define IVLCControl_pause(p) (p)->lpVtbl->pause(p)
+#define IVLCControl_stop(p) (p)->lpVtbl->stop(p)
+#define IVLCControl_get_Playing(p,a) (p)->lpVtbl->get_Playing(p,a)
+#define IVLCControl_get_Position(p,a) (p)->lpVtbl->get_Position(p,a)
+#define IVLCControl_put_Position(p,a) (p)->lpVtbl->put_Position(p,a)
+#define IVLCControl_get_Time(p,a) (p)->lpVtbl->get_Time(p,a)
+#define IVLCControl_put_Time(p,a) (p)->lpVtbl->put_Time(p,a)
+#define IVLCControl_shuttle(p,a) (p)->lpVtbl->shuttle(p,a)
+#define IVLCControl_fullscreen(p) (p)->lpVtbl->fullscreen(p)
+#define IVLCControl_get_Length(p,a) (p)->lpVtbl->get_Length(p,a)
+#define IVLCControl_playFaster(p) (p)->lpVtbl->playFaster(p)
+#define IVLCControl_playSlower(p) (p)->lpVtbl->playSlower(p)
+#define IVLCControl_get_Volume(p,a) (p)->lpVtbl->get_Volume(p,a)
+#define IVLCControl_put_Volume(p,a) (p)->lpVtbl->put_Volume(p,a)
+#define IVLCControl_toggleMute(p) (p)->lpVtbl->toggleMute(p)
+#define IVLCControl_setVariable(p,a,b) (p)->lpVtbl->setVariable(p,a,b)
+#define IVLCControl_getVariable(p,a,b) (p)->lpVtbl->getVariable(p,a,b)
+#define IVLCControl_addTarget(p,a,b,c,d) (p)->lpVtbl->addTarget(p,a,b,c,d)
+#define IVLCControl_get_PlaylistIndex(p,a) (p)->lpVtbl->get_PlaylistIndex(p,a)
+#define IVLCControl_get_PlaylistCount(p,a) (p)->lpVtbl->get_PlaylistCount(p,a)
+#define IVLCControl_playlistNext(p) (p)->lpVtbl->playlistNext(p)
+#define IVLCControl_playlistPrev(p) (p)->lpVtbl->playlistPrev(p)
+#define IVLCControl_playlistClear(p) (p)->lpVtbl->playlistClear(p)
+#define IVLCControl_get_VersionInfo(p,a) (p)->lpVtbl->get_VersionInfo(p,a)
+#define IVLCControl_get_MRL(p,a) (p)->lpVtbl->get_MRL(p,a)
+#define IVLCControl_put_MRL(p,a) (p)->lpVtbl->put_MRL(p,a)
+#define IVLCControl_get_AutoPlay(p,a) (p)->lpVtbl->get_AutoPlay(p,a)
+#define IVLCControl_put_AutoPlay(p,a) (p)->lpVtbl->put_AutoPlay(p,a)
+#define IVLCControl_get_AutoLoop(p,a) (p)->lpVtbl->get_AutoLoop(p,a)
+#define IVLCControl_put_AutoLoop(p,a) (p)->lpVtbl->put_AutoLoop(p,a)
+#endif
 
+#endif
 
+HRESULT CALLBACK IVLCControl_get_Visible_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL* visible);
 void __RPC_STUB IVLCControl_get_Visible_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Visible_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ VARIANT_BOOL visible);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_Visible_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL visible);
 void __RPC_STUB IVLCControl_put_Visible_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_play_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_play_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_play_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_pause_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_pause_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_pause_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_stop_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_stop_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_stop_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_Playing_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL* isPlaying);
 void __RPC_STUB IVLCControl_get_Playing_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ float __RPC_FAR *position);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_Position_Proxy(
+    IVLCControl* This,
+    float* position);
 void __RPC_STUB IVLCControl_get_Position_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ float position);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_Position_Proxy(
+    IVLCControl* This,
+    float position);
 void __RPC_STUB IVLCControl_put_Position_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Time_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ int __RPC_FAR *seconds);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_Time_Proxy(
+    IVLCControl* This,
+    int* seconds);
 void __RPC_STUB IVLCControl_get_Time_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Time_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ int seconds);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_Time_Proxy(
+    IVLCControl* This,
+    int seconds);
 void __RPC_STUB IVLCControl_put_Time_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_shuttle_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ int seconds);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_shuttle_Proxy(
+    IVLCControl* This,
+    int seconds);
 void __RPC_STUB IVLCControl_shuttle_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_fullscreen_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_fullscreen_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_fullscreen_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][hidden][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ int __RPC_FAR *seconds);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_Length_Proxy(
+    IVLCControl* This,
+    int* seconds);
 void __RPC_STUB IVLCControl_get_Length_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playFaster_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_playFaster_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_playFaster_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playSlower_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_playSlower_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_playSlower_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ int __RPC_FAR *volume);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_Volume_Proxy(
+    IVLCControl* This,
+    int* volume);
 void __RPC_STUB IVLCControl_get_Volume_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ int volume);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_Volume_Proxy(
+    IVLCControl* This,
+    int volume);
 void __RPC_STUB IVLCControl_put_Volume_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_toggleMute_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_toggleMute_Proxy(
+    IVLCControl* This);
 void __RPC_STUB IVLCControl_toggleMute_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_setVariable_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ BSTR name,
-    /* [in] */ VARIANT value);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_setVariable_Proxy(
+    IVLCControl* This,
+    BSTR name,
+    VARIANT value);
 void __RPC_STUB IVLCControl_setVariable_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_getVariable_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ BSTR name,
-    /* [retval][out] */ VARIANT __RPC_FAR *value);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_getVariable_Proxy(
+    IVLCControl* This,
+    BSTR name,
+    VARIANT* value);
 void __RPC_STUB IVLCControl_getVariable_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_addTarget_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ BSTR uri,
-    /* [in] */ VARIANT options,
-    /* [in] */ enum VLCPlaylistMode mode,
-    /* [in] */ int position);
-
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_addTarget_Proxy(
+    IVLCControl* This,
+    BSTR uri,
+    VARIANT options,
+    enum VLCPlaylistMode mode,
+    int position);
 void __RPC_STUB IVLCControl_addTarget_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_PlaylistIndex_Proxy(
+    IVLCControl* This,
+    int* index);
+void __RPC_STUB IVLCControl_get_PlaylistIndex_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_PlaylistCount_Proxy(
+    IVLCControl* This,
+    int* index);
+void __RPC_STUB IVLCControl_get_PlaylistCount_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_playlistNext_Proxy(
+    IVLCControl* This);
+void __RPC_STUB IVLCControl_playlistNext_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_playlistPrev_Proxy(
+    IVLCControl* This);
+void __RPC_STUB IVLCControl_playlistPrev_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_playlistClear_Proxy(
+    IVLCControl* This);
+void __RPC_STUB IVLCControl_playlistClear_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_VersionInfo_Proxy(
+    IVLCControl* This,
+    BSTR* version);
+void __RPC_STUB IVLCControl_get_VersionInfo_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_MRL_Proxy(
+    IVLCControl* This,
+    BSTR* mrl);
+void __RPC_STUB IVLCControl_get_MRL_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_MRL_Proxy(
+    IVLCControl* This,
+    BSTR mrl);
+void __RPC_STUB IVLCControl_put_MRL_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_AutoPlay_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL* autoplay);
+void __RPC_STUB IVLCControl_get_AutoPlay_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_AutoPlay_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL autoplay);
+void __RPC_STUB IVLCControl_put_AutoPlay_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_get_AutoLoop_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL* autoloop);
+void __RPC_STUB IVLCControl_get_AutoLoop_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl_put_AutoLoop_Proxy(
+    IVLCControl* This,
+    VARIANT_BOOL autoloop);
+void __RPC_STUB IVLCControl_put_AutoLoop_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
 
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_PlaylistIndex_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ int __RPC_FAR *index);
+#endif  /* __IVLCControl_INTERFACE_DEFINED__ */
 
+#define DISPID_PlayEvent (100)
 
-void __RPC_STUB IVLCControl_get_PlaylistIndex_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+#define DISPID_PauseEvent (101)
 
+#define DISPID_StopEvent (102)
 
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_PlaylistCount_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ int __RPC_FAR *index);
+/*****************************************************************************
+ * DVLCEvents dispinterface
+ */
+#ifndef __DVLCEvents_DISPINTERFACE_DEFINED__
+#define __DVLCEvents_DISPINTERFACE_DEFINED__
 
+DEFINE_GUID(DIID_DVLCEvents, 0xdf48072f, 0x5ef8, 0x434e, 0x9b,0x40, 0xe2,0xf3,0xae,0x75,0x9b,0x5f);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface DVLCEvents : public IDispatch
+{
+};
+#else
+typedef struct DVLCEventsVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        DVLCEvents* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        DVLCEvents* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        DVLCEvents* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        DVLCEvents* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        DVLCEvents* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        DVLCEvents* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        DVLCEvents* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    END_INTERFACE
+} DVLCEventsVtbl;
+interface DVLCEvents {
+    const DVLCEventsVtbl* lpVtbl;
+};
 
-void __RPC_STUB IVLCControl_get_PlaylistCount_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define DVLCEvents_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define DVLCEvents_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define DVLCEvents_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define DVLCEvents_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define DVLCEvents_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define DVLCEvents_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define DVLCEvents_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+#endif
 
+#endif
 
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playlistNext_Proxy( 
-    IVLCControl __RPC_FAR * This);
+#endif  /* __DVLCEvents_DISPINTERFACE_DEFINED__ */
 
+#ifndef __IVLCAudio_FWD_DEFINED__
+#define __IVLCAudio_FWD_DEFINED__
+typedef interface IVLCAudio IVLCAudio;
+#endif
 
-void __RPC_STUB IVLCControl_playlistNext_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+/*****************************************************************************
+ * IVLCAudio interface
+ */
+#ifndef __IVLCAudio_INTERFACE_DEFINED__
+#define __IVLCAudio_INTERFACE_DEFINED__
 
+DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f,0x3f,0xd9,0xd4);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IVLCAudio : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_mute(
+        VARIANT_BOOL* muted) = 0;
 
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playlistPrev_Proxy( 
-    IVLCControl __RPC_FAR * This);
+    virtual HRESULT STDMETHODCALLTYPE put_mute(
+        VARIANT_BOOL muted) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_volume(
+        int* volume) = 0;
 
-void __RPC_STUB IVLCControl_playlistPrev_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE put_volume(
+        int volume) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE toggleMute(
+        ) = 0;
 
-/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playlistClear_Proxy( 
-    IVLCControl __RPC_FAR * This);
-
+};
+#else
+typedef struct IVLCAudioVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCAudio* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCAudio* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCAudio* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCAudio* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCAudio* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCAudio* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCAudio* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCAudio methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_mute)(
+        IVLCAudio* This,
+        VARIANT_BOOL* muted);
+
+    HRESULT (STDMETHODCALLTYPE *put_mute)(
+        IVLCAudio* This,
+        VARIANT_BOOL muted);
+
+    HRESULT (STDMETHODCALLTYPE *get_volume)(
+        IVLCAudio* This,
+        int* volume);
+
+    HRESULT (STDMETHODCALLTYPE *put_volume)(
+        IVLCAudio* This,
+        int volume);
+
+    HRESULT (STDMETHODCALLTYPE *toggleMute)(
+        IVLCAudio* This);
+
+    END_INTERFACE
+} IVLCAudioVtbl;
+interface IVLCAudio {
+    const IVLCAudioVtbl* lpVtbl;
+};
 
-void __RPC_STUB IVLCControl_playlistClear_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCAudio_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCAudio_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCAudio_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCAudio_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCAudio_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCAudio_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCAudio_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCAudio methods ***/
+#define IVLCAudio_get_mute(p,a) (p)->lpVtbl->get_mute(p,a)
+#define IVLCAudio_put_mute(p,a) (p)->lpVtbl->put_mute(p,a)
+#define IVLCAudio_get_volume(p,a) (p)->lpVtbl->get_volume(p,a)
+#define IVLCAudio_put_volume(p,a) (p)->lpVtbl->put_volume(p,a)
+#define IVLCAudio_toggleMute(p) (p)->lpVtbl->toggleMute(p)
+#endif
 
+#endif
 
-/* [helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_VersionInfo_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ BSTR __RPC_FAR *version);
+HRESULT CALLBACK IVLCAudio_get_mute_Proxy(
+    IVLCAudio* This,
+    VARIANT_BOOL* muted);
+void __RPC_STUB IVLCAudio_get_mute_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCAudio_put_mute_Proxy(
+    IVLCAudio* This,
+    VARIANT_BOOL muted);
+void __RPC_STUB IVLCAudio_put_mute_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCAudio_get_volume_Proxy(
+    IVLCAudio* This,
+    int* volume);
+void __RPC_STUB IVLCAudio_get_volume_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCAudio_put_volume_Proxy(
+    IVLCAudio* This,
+    int volume);
+void __RPC_STUB IVLCAudio_put_volume_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCAudio_toggleMute_Proxy(
+    IVLCAudio* This);
+void __RPC_STUB IVLCAudio_toggleMute_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IVLCAudio_INTERFACE_DEFINED__ */
+
+#ifndef __IVLCInput_FWD_DEFINED__
+#define __IVLCInput_FWD_DEFINED__
+typedef interface IVLCInput IVLCInput;
+#endif
 
+/*****************************************************************************
+ * IVLCInput interface
+ */
+#ifndef __IVLCInput_INTERFACE_DEFINED__
+#define __IVLCInput_INTERFACE_DEFINED__
 
-void __RPC_STUB IVLCControl_get_VersionInfo_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IVLCInput : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_length(
+        __int64* length) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_position(
+        float* position) = 0;
 
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_MRL_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ BSTR __RPC_FAR *mrl);
+    virtual HRESULT STDMETHODCALLTYPE put_position(
+        float position) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_time(
+        __int64* time) = 0;
 
-void __RPC_STUB IVLCControl_get_MRL_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE put_time(
+        __int64 time) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_state(
+        int* state) = 0;
 
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_MRL_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ BSTR mrl);
+    virtual HRESULT STDMETHODCALLTYPE get_rate(
+        float* rate) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE put_rate(
+        float rate) = 0;
 
-void __RPC_STUB IVLCControl_put_MRL_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE get_fps(
+        float* fps) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_hasVout(
+        VARIANT_BOOL* hasVout) = 0;
 
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoPlay_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoplay);
+};
+#else
+typedef struct IVLCInputVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCInput* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCInput* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCInput* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCInput* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCInput* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCInput* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCInput* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCInput methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_length)(
+        IVLCInput* This,
+        __int64* length);
+
+    HRESULT (STDMETHODCALLTYPE *get_position)(
+        IVLCInput* This,
+        float* position);
+
+    HRESULT (STDMETHODCALLTYPE *put_position)(
+        IVLCInput* This,
+        float position);
+
+    HRESULT (STDMETHODCALLTYPE *get_time)(
+        IVLCInput* This,
+        __int64* time);
+
+    HRESULT (STDMETHODCALLTYPE *put_time)(
+        IVLCInput* This,
+        __int64 time);
+
+    HRESULT (STDMETHODCALLTYPE *get_state)(
+        IVLCInput* This,
+        int* state);
+
+    HRESULT (STDMETHODCALLTYPE *get_rate)(
+        IVLCInput* This,
+        float* rate);
+
+    HRESULT (STDMETHODCALLTYPE *put_rate)(
+        IVLCInput* This,
+        float rate);
+
+    HRESULT (STDMETHODCALLTYPE *get_fps)(
+        IVLCInput* This,
+        float* fps);
+
+    HRESULT (STDMETHODCALLTYPE *get_hasVout)(
+        IVLCInput* This,
+        VARIANT_BOOL* hasVout);
+
+    END_INTERFACE
+} IVLCInputVtbl;
+interface IVLCInput {
+    const IVLCInputVtbl* lpVtbl;
+};
 
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCInput_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCInput_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCInput_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCInput_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCInput_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCInput_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCInput methods ***/
+#define IVLCInput_get_length(p,a) (p)->lpVtbl->get_length(p,a)
+#define IVLCInput_get_position(p,a) (p)->lpVtbl->get_position(p,a)
+#define IVLCInput_put_position(p,a) (p)->lpVtbl->put_position(p,a)
+#define IVLCInput_get_time(p,a) (p)->lpVtbl->get_time(p,a)
+#define IVLCInput_put_time(p,a) (p)->lpVtbl->put_time(p,a)
+#define IVLCInput_get_state(p,a) (p)->lpVtbl->get_state(p,a)
+#define IVLCInput_get_rate(p,a) (p)->lpVtbl->get_rate(p,a)
+#define IVLCInput_put_rate(p,a) (p)->lpVtbl->put_rate(p,a)
+#define IVLCInput_get_fps(p,a) (p)->lpVtbl->get_fps(p,a)
+#define IVLCInput_get_hasVout(p,a) (p)->lpVtbl->get_hasVout(p,a)
+#endif
 
-void __RPC_STUB IVLCControl_get_AutoPlay_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+#endif
 
+HRESULT CALLBACK IVLCInput_get_length_Proxy(
+    IVLCInput* This,
+    __int64* length);
+void __RPC_STUB IVLCInput_get_length_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_position_Proxy(
+    IVLCInput* This,
+    float* position);
+void __RPC_STUB IVLCInput_get_position_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_put_position_Proxy(
+    IVLCInput* This,
+    float position);
+void __RPC_STUB IVLCInput_put_position_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_time_Proxy(
+    IVLCInput* This,
+    __int64* time);
+void __RPC_STUB IVLCInput_get_time_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_put_time_Proxy(
+    IVLCInput* This,
+    __int64 time);
+void __RPC_STUB IVLCInput_put_time_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_state_Proxy(
+    IVLCInput* This,
+    int* state);
+void __RPC_STUB IVLCInput_get_state_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_rate_Proxy(
+    IVLCInput* This,
+    float* rate);
+void __RPC_STUB IVLCInput_get_rate_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_put_rate_Proxy(
+    IVLCInput* This,
+    float rate);
+void __RPC_STUB IVLCInput_put_rate_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_fps_Proxy(
+    IVLCInput* This,
+    float* fps);
+void __RPC_STUB IVLCInput_get_fps_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCInput_get_hasVout_Proxy(
+    IVLCInput* This,
+    VARIANT_BOOL* hasVout);
+void __RPC_STUB IVLCInput_get_hasVout_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IVLCInput_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IVLCPlaylist interface
+ */
+#ifndef __IVLCPlaylist_INTERFACE_DEFINED__
+#define __IVLCPlaylist_INTERFACE_DEFINED__
 
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_AutoPlay_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ VARIANT_BOOL autoplay);
+DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IVLCPlaylist : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_itemCount(
+        int* count) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE get_isPlaying(
+        VARIANT_BOOL* playing) = 0;
 
-void __RPC_STUB IVLCControl_put_AutoPlay_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE add(
+        BSTR uri,
+        BSTR name,
+        VARIANT options,
+        int* item) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE play(
+        ) = 0;
 
-/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoLoop_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoloop);
+    virtual HRESULT STDMETHODCALLTYPE playItem(
+        int item) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE togglePause(
+        ) = 0;
 
-void __RPC_STUB IVLCControl_get_AutoLoop_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE stop(
+        ) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE next(
+        ) = 0;
 
-/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_AutoLoop_Proxy( 
-    IVLCControl __RPC_FAR * This,
-    /* [in] */ VARIANT_BOOL autoloop);
+    virtual HRESULT STDMETHODCALLTYPE prev(
+        ) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE clear(
+        ) = 0;
 
-void __RPC_STUB IVLCControl_put_AutoLoop_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
+    virtual HRESULT STDMETHODCALLTYPE removeItem(
+        int item) = 0;
 
+};
+#else
+typedef struct IVLCPlaylistVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCPlaylist* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCPlaylist* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCPlaylist* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCPlaylist* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCPlaylist* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCPlaylist* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCPlaylist* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCPlaylist methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_itemCount)(
+        IVLCPlaylist* This,
+        int* count);
+
+    HRESULT (STDMETHODCALLTYPE *get_isPlaying)(
+        IVLCPlaylist* This,
+        VARIANT_BOOL* playing);
+
+    HRESULT (STDMETHODCALLTYPE *add)(
+        IVLCPlaylist* This,
+        BSTR uri,
+        BSTR name,
+        VARIANT options,
+        int* item);
+
+    HRESULT (STDMETHODCALLTYPE *play)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *playItem)(
+        IVLCPlaylist* This,
+        int item);
+
+    HRESULT (STDMETHODCALLTYPE *togglePause)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *stop)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *next)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *prev)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *clear)(
+        IVLCPlaylist* This);
+
+    HRESULT (STDMETHODCALLTYPE *removeItem)(
+        IVLCPlaylist* This,
+        int item);
+
+    END_INTERFACE
+} IVLCPlaylistVtbl;
+interface IVLCPlaylist {
+    const IVLCPlaylistVtbl* lpVtbl;
+};
 
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCPlaylist_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCPlaylist_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCPlaylist_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCPlaylist_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCPlaylist_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCPlaylist_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCPlaylist_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCPlaylist methods ***/
+#define IVLCPlaylist_get_itemCount(p,a) (p)->lpVtbl->get_itemCount(p,a)
+#define IVLCPlaylist_get_isPlaying(p,a) (p)->lpVtbl->get_isPlaying(p,a)
+#define IVLCPlaylist_add(p,a,b,c,d) (p)->lpVtbl->add(p,a,b,c,d)
+#define IVLCPlaylist_play(p) (p)->lpVtbl->play(p)
+#define IVLCPlaylist_playItem(p,a) (p)->lpVtbl->playItem(p,a)
+#define IVLCPlaylist_togglePause(p) (p)->lpVtbl->togglePause(p)
+#define IVLCPlaylist_stop(p) (p)->lpVtbl->stop(p)
+#define IVLCPlaylist_next(p) (p)->lpVtbl->next(p)
+#define IVLCPlaylist_prev(p) (p)->lpVtbl->prev(p)
+#define IVLCPlaylist_clear(p) (p)->lpVtbl->clear(p)
+#define IVLCPlaylist_removeItem(p,a) (p)->lpVtbl->removeItem(p,a)
+#endif
 
-#endif         /* __IVLCControl_INTERFACE_DEFINED__ */
+#endif
 
+HRESULT CALLBACK IVLCPlaylist_get_itemCount_Proxy(
+    IVLCPlaylist* This,
+    int* count);
+void __RPC_STUB IVLCPlaylist_get_itemCount_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_get_isPlaying_Proxy(
+    IVLCPlaylist* This,
+    VARIANT_BOOL* playing);
+void __RPC_STUB IVLCPlaylist_get_isPlaying_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_add_Proxy(
+    IVLCPlaylist* This,
+    BSTR uri,
+    BSTR name,
+    VARIANT options,
+    int* item);
+void __RPC_STUB IVLCPlaylist_add_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_play_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_play_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_playItem_Proxy(
+    IVLCPlaylist* This,
+    int item);
+void __RPC_STUB IVLCPlaylist_playItem_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_togglePause_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_togglePause_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_stop_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_stop_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_next_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_next_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_prev_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_prev_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_clear_Proxy(
+    IVLCPlaylist* This);
+void __RPC_STUB IVLCPlaylist_clear_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCPlaylist_removeItem_Proxy(
+    IVLCPlaylist* This,
+    int item);
+void __RPC_STUB IVLCPlaylist_removeItem_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IVLCPlaylist_INTERFACE_DEFINED__ */
+
+#ifndef __IVLCVideo_FWD_DEFINED__
+#define __IVLCVideo_FWD_DEFINED__
+typedef interface IVLCVideo IVLCVideo;
+#endif
 
-#ifndef __DVLCEvents_DISPINTERFACE_DEFINED__
-#define __DVLCEvents_DISPINTERFACE_DEFINED__
+/*****************************************************************************
+ * IVLCVideo interface
+ */
+#ifndef __IVLCVideo_INTERFACE_DEFINED__
+#define __IVLCVideo_INTERFACE_DEFINED__
 
-/* dispinterface DVLCEvents */
-/* [hidden][helpstring][uuid] */ 
+DEFINE_GUID(IID_IVLCVideo, 0x0aaedf0b, 0xd333, 0x4b27, 0xa0,0xc6, 0xbb,0xf3,0x14,0x13,0xa4,0x2e);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IVLCVideo : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_fullscreen(
+        VARIANT_BOOL* fullscreen) = 0;
 
+    virtual HRESULT STDMETHODCALLTYPE put_fullscreen(
+        VARIANT_BOOL fullscreen) = 0;
 
-EXTERN_C const IID DIID_DVLCEvents;
+    virtual HRESULT STDMETHODCALLTYPE get_width(
+        int* width) = 0;
 
-#if defined(__cplusplus) && !defined(CINTERFACE)
+    virtual HRESULT STDMETHODCALLTYPE get_height(
+        int* height) = 0;
 
-    MIDL_INTERFACE("DF48072F-5EF8-434e-9B40-E2F3AE759B5F")
-    DVLCEvents : public IDispatch
-    {
-    };
-    
-#else  /* C style interface */
-
-    typedef struct DVLCEventsVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
-            DVLCEvents __RPC_FAR * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
-            DVLCEvents __RPC_FAR * This);
-        
-        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
-            DVLCEvents __RPC_FAR * This);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( 
-            DVLCEvents __RPC_FAR * This,
-            /* [out] */ UINT __RPC_FAR *pctinfo);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( 
-            DVLCEvents __RPC_FAR * This,
-            /* [in] */ UINT iTInfo,
-            /* [in] */ LCID lcid,
-            /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
-        
-        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( 
-            DVLCEvents __RPC_FAR * This,
-            /* [in] */ REFIID riid,
-            /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
-            /* [in] */ UINT cNames,
-            /* [in] */ LCID lcid,
-            /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( 
-            DVLCEvents __RPC_FAR * This,
-            /* [in] */ DISPID dispIdMember,
-            /* [in] */ REFIID riid,
-            /* [in] */ LCID lcid,
-            /* [in] */ WORD wFlags,
-            /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
-            /* [out] */ VARIANT __RPC_FAR *pVarResult,
-            /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
-            /* [out] */ UINT __RPC_FAR *puArgErr);
-        
-        END_INTERFACE
-    } DVLCEventsVtbl;
-
-    interface DVLCEvents
-    {
-        CONST_VTBL struct DVLCEventsVtbl __RPC_FAR *lpVtbl;
-    };
-
-    
+};
+#else
+typedef struct IVLCVideoVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCVideo* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCVideo* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCVideo* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCVideo* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCVideo* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCVideo* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCVideo* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCVideo methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_fullscreen)(
+        IVLCVideo* This,
+        VARIANT_BOOL* fullscreen);
+
+    HRESULT (STDMETHODCALLTYPE *put_fullscreen)(
+        IVLCVideo* This,
+        VARIANT_BOOL fullscreen);
+
+    HRESULT (STDMETHODCALLTYPE *get_width)(
+        IVLCVideo* This,
+        int* width);
+
+    HRESULT (STDMETHODCALLTYPE *get_height)(
+        IVLCVideo* This,
+        int* height);
+
+    END_INTERFACE
+} IVLCVideoVtbl;
+interface IVLCVideo {
+    const IVLCVideoVtbl* lpVtbl;
+};
 
 #ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCVideo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCVideo_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCVideo_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCVideo_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCVideo_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCVideo_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCVideo_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCVideo methods ***/
+#define IVLCVideo_get_fullscreen(p,a) (p)->lpVtbl->get_fullscreen(p,a)
+#define IVLCVideo_put_fullscreen(p,a) (p)->lpVtbl->put_fullscreen(p,a)
+#define IVLCVideo_get_width(p,a) (p)->lpVtbl->get_width(p,a)
+#define IVLCVideo_get_height(p,a) (p)->lpVtbl->get_height(p,a)
+#endif
 
+#endif
 
-#define DVLCEvents_QueryInterface(This,riid,ppvObject) \
-    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
-
-#define DVLCEvents_AddRef(This)        \
-    (This)->lpVtbl -> AddRef(This)
+HRESULT CALLBACK IVLCVideo_get_fullscreen_Proxy(
+    IVLCVideo* This,
+    VARIANT_BOOL* fullscreen);
+void __RPC_STUB IVLCVideo_get_fullscreen_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCVideo_put_fullscreen_Proxy(
+    IVLCVideo* This,
+    VARIANT_BOOL fullscreen);
+void __RPC_STUB IVLCVideo_put_fullscreen_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCVideo_get_width_Proxy(
+    IVLCVideo* This,
+    int* width);
+void __RPC_STUB IVLCVideo_get_width_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCVideo_get_height_Proxy(
+    IVLCVideo* This,
+    int* height);
+void __RPC_STUB IVLCVideo_get_height_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IVLCVideo_INTERFACE_DEFINED__ */
+
+#ifndef __IVLCControl2_FWD_DEFINED__
+#define __IVLCControl2_FWD_DEFINED__
+typedef interface IVLCControl2 IVLCControl2;
+#endif
 
-#define DVLCEvents_Release(This)       \
-    (This)->lpVtbl -> Release(This)
+/*****************************************************************************
+ * IVLCControl2 interface
+ */
+#ifndef __IVLCControl2_INTERFACE_DEFINED__
+#define __IVLCControl2_INTERFACE_DEFINED__
 
+DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IVLCControl2 : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE get_audio(
+        IVLCAudio** obj) = 0;
 
-#define DVLCEvents_GetTypeInfoCount(This,pctinfo)      \
-    (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+    virtual HRESULT STDMETHODCALLTYPE get_input(
+        IVLCInput** obj) = 0;
 
-#define DVLCEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo)       \
-    (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+    virtual HRESULT STDMETHODCALLTYPE get_playlist(
+        IVLCPlaylist** obj) = 0;
 
-#define DVLCEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)     \
-    (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+    virtual HRESULT STDMETHODCALLTYPE get_video(
+        IVLCVideo** obj) = 0;
 
-#define DVLCEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)       \
-    (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+};
+#else
+typedef struct IVLCControl2Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IVLCControl2* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IVLCControl2* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IVLCControl2* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        IVLCControl2* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        IVLCControl2* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        IVLCControl2* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        IVLCControl2* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** IVLCControl2 methods ***/
+    HRESULT (STDMETHODCALLTYPE *get_audio)(
+        IVLCControl2* This,
+        IVLCAudio** obj);
+
+    HRESULT (STDMETHODCALLTYPE *get_input)(
+        IVLCControl2* This,
+        IVLCInput** obj);
+
+    HRESULT (STDMETHODCALLTYPE *get_playlist)(
+        IVLCControl2* This,
+        IVLCPlaylist** obj);
+
+    HRESULT (STDMETHODCALLTYPE *get_video)(
+        IVLCControl2* This,
+        IVLCVideo** obj);
+
+    END_INTERFACE
+} IVLCControl2Vtbl;
+interface IVLCControl2 {
+    const IVLCControl2Vtbl* lpVtbl;
+};
 
-#endif /* COBJMACROS */
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IVLCControl2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IVLCControl2_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IVLCControl2_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define IVLCControl2_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define IVLCControl2_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define IVLCControl2_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define IVLCControl2_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** IVLCControl2 methods ***/
+#define IVLCControl2_get_audio(p,a) (p)->lpVtbl->get_audio(p,a)
+#define IVLCControl2_get_input(p,a) (p)->lpVtbl->get_input(p,a)
+#define IVLCControl2_get_playlist(p,a) (p)->lpVtbl->get_playlist(p,a)
+#define IVLCControl2_get_video(p,a) (p)->lpVtbl->get_video(p,a)
+#endif
 
+#endif
 
-#endif         /* C style interface */
+HRESULT CALLBACK IVLCControl2_get_audio_Proxy(
+    IVLCControl2* This,
+    IVLCAudio** obj);
+void __RPC_STUB IVLCControl2_get_audio_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl2_get_input_Proxy(
+    IVLCControl2* This,
+    IVLCInput** obj);
+void __RPC_STUB IVLCControl2_get_input_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl2_get_playlist_Proxy(
+    IVLCControl2* This,
+    IVLCPlaylist** obj);
+void __RPC_STUB IVLCControl2_get_playlist_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK IVLCControl2_get_video_Proxy(
+    IVLCControl2* This,
+    IVLCVideo** obj);
+void __RPC_STUB IVLCControl2_get_video_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IVLCControl2_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * VLCPlugin coclass
+ */
 
+DEFINE_GUID(CLSID_VLCPlugin, 0xe23fe9c6, 0x778e, 0x49d4, 0xb5,0x37, 0x38,0xfc,0xde,0x48,0x87,0xd8);
 
-#endif         /* __DVLCEvents_DISPINTERFACE_DEFINED__ */
+#ifndef __VLCPlugin_FWD_DEFINED__
+#define __VLCPlugin_FWD_DEFINED__
+typedef struct VLCPlugin VLCPlugin;
+#endif /* defined __VLCPlugin_FWD_DEFINED__ */
 
+/*****************************************************************************
+ * VLCPlugin2 coclass
+ */
 
-EXTERN_C const CLSID CLSID_VLCPlugin;
+DEFINE_GUID(CLSID_VLCPlugin2, 0x9be31822, 0xfdad, 0x461b, 0xad,0x51, 0xbe,0x1d,0x1c,0x15,0x99,0x21);
 
-#ifdef __cplusplus
+#ifndef __VLCPlugin2_FWD_DEFINED__
+#define __VLCPlugin2_FWD_DEFINED__
+typedef struct VLCPlugin2 VLCPlugin2;
+#endif /* defined __VLCPlugin2_FWD_DEFINED__ */
 
-class DECLSPEC_UUID("E23FE9C6-778E-49D4-B537-38FCDE4887D8")
-VLCPlugin;
-#endif
-#endif /* __AXVLC_LIBRARY_DEFINED__ */
+/* Begin additional prototypes for all interfaces */
 
-/* Additional Prototypes for ALL interfaces */
+unsigned long   __RPC_USER VARIANT_UserSize     (unsigned long *, unsigned long,   VARIANT *);
+unsigned char * __RPC_USER VARIANT_UserMarshal  (unsigned long *, unsigned char *, VARIANT *);
+unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT *);
+void            __RPC_USER VARIANT_UserFree     (unsigned long *, VARIANT *);
+unsigned long   __RPC_USER BSTR_UserSize     (unsigned long *, unsigned long,   BSTR *);
+unsigned char * __RPC_USER BSTR_UserMarshal  (unsigned long *, unsigned char *, BSTR *);
+unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR *);
+void            __RPC_USER BSTR_UserFree     (unsigned long *, BSTR *);
 
-/* end of Additional Prototypes */
+/* End additional prototypes */
 
 #ifdef __cplusplus
 }
 #endif
-
-#endif
+#endif /* __WIDL_AXVLC_IDL_H */
diff --git a/activex/guiddef.h b/activex/guiddef.h
new file mode 100755 (executable)
index 0000000..0c82217
--- /dev/null
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * guiddef.h: ActiveX control for VLC
+ *****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ *
+ * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef __GUIDDEF_H__
+#define __GUIDDEF_H__
+/*
+** Widl generated code requires guiddef.h,
+** which is not available under MinGW
+*/
+#undef GUID_EXT
+#define GUID_EXT
+#include <initguid.h>
+
+#endif
+
index 98ad903d5da87d6d8e0cb3426e0f1c602d004959..de152411eb7cd1d1698428f86aa2241723207240 100644 (file)
@@ -21,6 +21,9 @@
  *****************************************************************************/
 
 #include "plugin.h"
+#include "utils.h"
+
+#include <stdio.h>
 
 #include <comcat.h>
 #include <windows.h>
@@ -30,16 +33,12 @@ using namespace std;
 
 #define COMPANY_STR "VideoLAN"
 #define PROGRAM_STR "VLCPlugin"
-#define VERSION_MAJOR_STR "1"
-#define VERSION_MINOR_STR "0"
 #define DESCRIPTION "VideoLAN VLC ActiveX Plugin"
 
 #define THREADING_MODEL "Apartment"
 #define MISC_STATUS     "131473"
 
 #define PROGID_STR COMPANY_STR"."PROGRAM_STR
-#define VERS_PROGID_STR COMPANY_STR"."PROGRAM_STR"."VERSION_MAJOR_STR
-#define VERSION_STR VERSION_MAJOR_STR"."VERSION_MINOR_STR
 
 #define GUID_STRLEN 39
 
@@ -58,9 +57,10 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
     *ppv = NULL;
 
-    if( CLSID_VLCPlugin == rclsid )
+    if( (CLSID_VLCPlugin == rclsid)
+     || (CLSID_VLCPlugin2 == rclsid) )
     {
-        VLCPluginClass *plugin = new VLCPluginClass(&i_class_ref, h_instance);
+        VLCPluginClass *plugin = new VLCPluginClass(&i_class_ref, h_instance, rclsid);
         hr = plugin->QueryInterface(riid, ppv);
         plugin->Release();
     }
@@ -72,48 +72,67 @@ STDAPI DllCanUnloadNow(VOID)
     return (0 == i_class_ref) ? S_OK: S_FALSE;
 };
 
-static LPCTSTR TStrFromGUID(REFGUID clsid)
+static inline HKEY keyCreate(HKEY parentKey, LPCSTR keyName)
 {
-    LPOLESTR oleStr;
-
-    if( FAILED(StringFromIID(clsid, &oleStr)) )
-        return NULL;
-
-    //check whether TCHAR and OLECHAR are both either ANSI or UNICODE
-    if( sizeof(TCHAR) == sizeof(OLECHAR) )
-        return (LPCTSTR)oleStr;
-
-    LPTSTR pct_CLSID = NULL;
-#ifndef OLE2ANSI
-    size_t len = WideCharToMultiByte(CP_ACP, 0, oleStr, -1, NULL, 0, NULL, NULL);
-    if( len > 0 )
+    HKEY childKey;
+    if( ERROR_SUCCESS == RegCreateKeyExA(parentKey, keyName, 0, NULL,
+                REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &childKey, NULL) )
     {
-        pct_CLSID = (char *)CoTaskMemAlloc(len);
-        WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len, NULL, NULL);
+        return childKey;
     }
-#else
-    size_t len = MutiByteToWideChar(CP_ACP, 0, oleStr, -1, NULL, 0);
-    if( len > 0 )
+    return NULL;
+};
+
+static inline HKEY keySet(HKEY hKey, LPCSTR valueName, const void *s, size_t len)
+{
+    if( NULL != hKey )
     {
-        clsidStr = (wchar_t *)CoTaskMemAlloc(len*sizeof(wchar_t));
-        MultiByteToWideChar(CP_ACP, 0, oleStr, -1, pct_CLSID, len);
+        RegSetValueExA(hKey, valueName, 0, REG_SZ,
+            (const BYTE*)s, len);
     }
-#endif
-    CoTaskMemFree(oleStr);
-    return pct_CLSID;
+    return hKey;
 };
 
-static HKEY keyCreate(HKEY parentKey, LPCTSTR keyName)
+static inline HKEY keySetDef(HKEY hKey, const void *s, size_t len)
 {
-    HKEY childKey;
-    if( ERROR_SUCCESS == RegCreateKeyEx(parentKey, keyName, 0, NULL,
-                REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &childKey, NULL) )
+    return keySet(hKey, NULL, s, len);
+};
+
+static inline HKEY keySetDef(HKEY hKey, LPCSTR s)
+{
+    return keySetDef(hKey, s, strlen(s)+1);
+};
+
+static inline HKEY keyClose(HKEY hKey)
+{
+    if( NULL != hKey )
     {
-        return childKey;
+        RegCloseKey(hKey);
     }
     return NULL;
 };
 
+static HRESULT UnregisterProgID(REFCLSID rclsid, unsigned int version)
+{
+    LPCSTR psz_CLSID = CStrFromGUID(rclsid);
+
+    if( NULL == psz_CLSID )
+        return E_OUTOFMEMORY;
+
+    char progId[sizeof(PROGID_STR)+16];
+    sprintf(progId, "%s.%u", PROGID_STR, version);
+
+    SHDeleteKeyA(HKEY_CLASSES_ROOT, progId);
+
+    HKEY hClsIDKey;
+    if( ERROR_SUCCESS == RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_WRITE, &hClsIDKey) )
+    {
+        SHDeleteKey(hClsIDKey, psz_CLSID);
+        RegCloseKey(hClsIDKey);
+    }
+    CoTaskMemFree((void *)psz_CLSID);
+};
+
 STDAPI DllUnregisterServer(VOID)
 {
     // unregister type lib from the registry
@@ -132,177 +151,193 @@ STDAPI DllUnregisterServer(VOID)
 
         pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin,
                 sizeof(implCategories)/sizeof(CATID), implCategories);
+        pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin2,
+                sizeof(implCategories)/sizeof(CATID), implCategories);
         pcr->Release();
     }
 
-    SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(VERS_PROGID_STR));
     SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
 
-    LPCTSTR psz_CLSID = TStrFromGUID(CLSID_VLCPlugin);
-
-    if( NULL == psz_CLSID )
-        return E_OUTOFMEMORY;
-
-    HKEY hClsIDKey;
-    if( ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("CLSID"), 0, KEY_WRITE, &hClsIDKey) )
-    {
-        SHDeleteKey(hClsIDKey, psz_CLSID);
-        RegCloseKey(hClsIDKey);
-    }
-    CoTaskMemFree((void *)psz_CLSID);
+    UnregisterProgID(CLSID_VLCPlugin, 1);
+    UnregisterProgID(CLSID_VLCPlugin2, 1);
 
     return S_OK;
 };
 
-STDAPI DllRegisterServer(VOID)
+static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int version, const char *path, size_t pathLen)
 {
-    DllUnregisterServer();
-
-    char DllPath[MAX_PATH];
-    DWORD DllPathLen= GetModuleFileName(h_instance, DllPath, sizeof(DllPath)) ;
-       if( 0 == DllPathLen )
-        return E_UNEXPECTED;
-
-    LPCTSTR psz_CLSID = TStrFromGUID(CLSID_VLCPlugin);
-
-    if( NULL == psz_CLSID )
-        return E_OUTOFMEMORY;
+    HKEY hClassKey;
+    {
+        LPCSTR psz_CLSID = CStrFromGUID(rclsid);
 
-    HKEY hBaseKey;
+        if( NULL == psz_CLSID )
+            return E_OUTOFMEMORY;
 
-    if( ERROR_SUCCESS != RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("CLSID"), 0, KEY_CREATE_SUB_KEY, &hBaseKey) )
-        return SELFREG_E_CLASS;
-
-    HKEY hClassKey = keyCreate(hBaseKey, psz_CLSID);
+        hClassKey = keyCreate(hParent, psz_CLSID);
+        CoTaskMemFree((void *)psz_CLSID);
+    }
     if( NULL != hClassKey )
     {
-        HKEY hSubKey;
-
         // default key value
-        RegSetValueEx(hClassKey, NULL, 0, REG_SZ,
-                (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));
+        keySetDef(hClassKey, DESCRIPTION, sizeof(DESCRIPTION));
 
         // Control key value
-        hSubKey = keyCreate(hClassKey, TEXT("Control"));
-        RegCloseKey(hSubKey);
+        keyClose(keyCreate(hClassKey, "Control"));
 
         // Insertable key value
-        //hSubKey = keyCreate(hClassKey, TEXT("Insertable"));
-        //RegCloseKey(hSubKey);
+        //keyClose(keyCreate(hClassKey, "Insertable"));
 
         // ToolboxBitmap32 key value
-        hSubKey = keyCreate(hClassKey, TEXT("ToolboxBitmap32"));
-        strcpy(DllPath+DllPathLen, ",1");
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                (const BYTE*)DllPath, DllPathLen+2);
-        DllPath[DllPathLen] = '\0';
-        RegCloseKey(hSubKey);
+        {
+            char iconPath[pathLen+3];
+            memcpy(iconPath, path, pathLen);
+            strcpy(iconPath+pathLen, ",1");
+            keyClose(keySetDef(keyCreate(hClassKey,
+                "ToolboxBitmap32"),
+                iconPath, sizeof(iconPath)));
+        }
 
 #ifdef BUILD_LOCALSERVER
         // LocalServer32 key value
-        hSubKey = keyCreate(hClassKey, TEXT("LocalServer32"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                (const BYTE*)DllPath, DllPathLen);
-        RegCloseKey(hSubKey);
+        keyClose(keySetDef(keyCreate(hClassKey,
+            "LocalServer32", path, pathLen+1)));
 #else
         // InprocServer32 key value
-        hSubKey = keyCreate(hClassKey, TEXT("InprocServer32"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                (const BYTE*)DllPath, DllPathLen);
-        RegSetValueEx(hSubKey, TEXT("ThreadingModel"), 0, REG_SZ,
-                (const BYTE*)THREADING_MODEL, sizeof(THREADING_MODEL));
-        RegCloseKey(hSubKey);
+        {
+            HKEY hSubKey = keySetDef(keyCreate(hClassKey,
+                "InprocServer32"),
+                path, pathLen+1);
+            keySet(hSubKey,
+                "ThreadingModel",
+                THREADING_MODEL, sizeof(THREADING_MODEL));
+            keyClose(hSubKey);
+        }
 #endif
 
         // MiscStatus key value
-        hSubKey = keyCreate(hClassKey, TEXT("MiscStatus\\1"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ, (const BYTE*)MISC_STATUS, sizeof(MISC_STATUS));
-        RegCloseKey(hSubKey);
+        keyClose(keySetDef(keyCreate(hClassKey,
+            "MiscStatus\\1"),
+            MISC_STATUS, sizeof(MISC_STATUS)));
 
         // Programmable key value
-        hSubKey = keyCreate(hClassKey, TEXT("Programmable"));
-        RegCloseKey(hSubKey);
+        keyClose(keyCreate(hClassKey, "Programmable"));
 
         // ProgID key value
-        hSubKey = keyCreate(hClassKey, TEXT("ProgID"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ, 
-                (const BYTE*)VERS_PROGID_STR, sizeof(VERS_PROGID_STR));
-        RegCloseKey(hSubKey);
+        {
+            char progId[sizeof(PROGID_STR)+16];
+            sprintf(progId, "%s.%u", PROGID_STR, version);
+            keyClose(keySetDef(keyCreate(hClassKey,
+                TEXT("ProgID")),
+                progId));
+        }
 
         // VersionIndependentProgID key value
-        hSubKey = keyCreate(hClassKey, TEXT("VersionIndependentProgID"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ, 
-                (const BYTE*)PROGID_STR, sizeof(PROGID_STR));
-        RegCloseKey(hSubKey);
+        keyClose(keySetDef(keyCreate(hClassKey,
+            "VersionIndependentProgID"),
+            PROGID_STR, sizeof(PROGID_STR)));
 
         // Version key value
-        hSubKey = keyCreate(hClassKey, TEXT("Version"));
-        RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                (const BYTE*)VERSION_STR, sizeof(VERSION_STR));
-        RegCloseKey(hSubKey);
+        {
+            char ver[32];
+            sprintf(ver, "%u.0", version);
+            keyClose(keySetDef(keyCreate(hClassKey,
+                "Version"),
+                ver));
+        }
 
         // TypeLib key value
-        LPCTSTR psz_LIBID = TStrFromGUID(LIBID_AXVLC);
+        LPCSTR psz_LIBID = CStrFromGUID(LIBID_AXVLC);
         if( NULL != psz_LIBID )
         {
-            hSubKey = keyCreate(hClassKey, TEXT("TypeLib"));
-            RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                    (const BYTE*)psz_LIBID, sizeof(TCHAR)*GUID_STRLEN);
-            RegCloseKey(hSubKey);
+            keyClose(keySetDef(keyCreate(hClassKey,
+                    "TypeLib"),
+                    psz_LIBID, GUID_STRLEN));
+            CoTaskMemFree((void *)psz_LIBID);
         }
         RegCloseKey(hClassKey);
     }
-    RegCloseKey(hBaseKey);
+    return S_OK;
+}
+
+static HRESULT RegisterProgID(REFCLSID rclsid, unsigned int version)
+{
+    LPCSTR psz_CLSID = CStrFromGUID(rclsid);
 
-    hBaseKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
+    if( NULL == psz_CLSID )
+        return E_OUTOFMEMORY;
+
+    char progId[sizeof(PROGID_STR)+16];
+    sprintf(progId, "%s.%u", PROGID_STR, version);
+
+    HKEY hBaseKey = keyCreate(HKEY_CLASSES_ROOT, progId);
     if( NULL != hBaseKey )
     {
         // default key value
-        RegSetValueEx(hBaseKey, NULL, 0, REG_SZ,
-                (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));
-
-        HKEY hSubKey = keyCreate(hBaseKey, TEXT("CLSID"));
-        if( NULL != hSubKey )
-        {
-            // default key value
-            RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                    (const BYTE*)psz_CLSID, sizeof(TCHAR)*GUID_STRLEN);
-
-            RegCloseKey(hSubKey);
-        }
-        hSubKey = keyCreate(hBaseKey, TEXT("CurVer"));
-        if( NULL != hSubKey )
-        {
-            // default key value
-            RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                    (const BYTE*)VERS_PROGID_STR, sizeof(VERS_PROGID_STR));
+        keySetDef(hBaseKey, DESCRIPTION, sizeof(DESCRIPTION));
 
-            RegCloseKey(hSubKey);
-        }
+        keyClose(keySetDef(keyCreate(hBaseKey, "CLSID"),
+            psz_CLSID,
+            GUID_STRLEN));
+        //hSubKey = keyClose(keyCreate(hBaseKey, "Insertable"));
         RegCloseKey(hBaseKey);
     }
+    CoTaskMemFree((void *)psz_CLSID);
 
-    hBaseKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(VERS_PROGID_STR));
+    return S_OK;
+}
+
+static HRESULT RegisterDefaultProgID(REFCLSID rclsid, unsigned int version)
+{
+    LPCSTR psz_CLSID = CStrFromGUID(rclsid);
+
+    if( NULL == psz_CLSID )
+        return E_OUTOFMEMORY;
+
+    HKEY hBaseKey = keyCreate(HKEY_CLASSES_ROOT, PROGID_STR);
     if( NULL != hBaseKey )
     {
         // default key value
-        RegSetValueEx(hBaseKey, NULL, 0, REG_SZ,
-                (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));
+        keySetDef(hBaseKey, DESCRIPTION, sizeof(DESCRIPTION));
 
-        HKEY hSubKey = keyCreate(hBaseKey, TEXT("CLSID"));
-        if( NULL != hSubKey )
-        {
-            // default key value
-            RegSetValueEx(hSubKey, NULL, 0, REG_SZ,
-                    (const BYTE*)psz_CLSID, sizeof(TCHAR)*GUID_STRLEN);
-
-            RegCloseKey(hSubKey);
-        }
-        //hSubKey = keyCreate(hBaseKey, TEXT("Insertable"));
-        //RegCloseKey(hSubKey);
+        keyClose(keySetDef(keyCreate(hBaseKey, "CLSID"),
+            psz_CLSID,
+            GUID_STRLEN));
  
-        RegCloseKey(hBaseKey);
+        char progId[sizeof(PROGID_STR)+16];
+        sprintf(progId, "%s.%u", PROGID_STR, version);
+
+        keyClose(keySetDef(keyCreate(hBaseKey, "CurVer"),
+            progId));
     }
+    CoTaskMemFree((void *)psz_CLSID);
+}
+
+STDAPI DllRegisterServer(VOID)
+{
+    DllUnregisterServer();
+
+    char DllPath[MAX_PATH];
+    DWORD DllPathLen=GetModuleFileNameA(h_instance, DllPath, sizeof(DllPath)) ;
+       if( 0 == DllPathLen )
+        return E_UNEXPECTED;
+
+    HKEY hBaseKey;
+
+    if( ERROR_SUCCESS != RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_CREATE_SUB_KEY, &hBaseKey) )
+        return SELFREG_E_CLASS;
+    
+    RegisterClassID(hBaseKey, CLSID_VLCPlugin, 1, DllPath, DllPathLen);
+    RegisterClassID(hBaseKey, CLSID_VLCPlugin2, 2, DllPath, DllPathLen);
+
+    RegCloseKey(hBaseKey);
+
+    RegisterProgID(CLSID_VLCPlugin, 1);
+    RegisterProgID(CLSID_VLCPlugin2, 2);
+
+    /* default control */
+    RegisterDefaultProgID(CLSID_VLCPlugin2, 2);
 
     // indicate which component categories we support
     ICatRegister *pcr;
@@ -317,6 +352,8 @@ STDAPI DllRegisterServer(VOID)
 
         pcr->RegisterClassImplCategories(CLSID_VLCPlugin,
                 sizeof(implCategories)/sizeof(CATID), implCategories);
+        pcr->RegisterClassImplCategories(CLSID_VLCPlugin2,
+                sizeof(implCategories)/sizeof(CATID), implCategories);
         pcr->Release();
     }
 
@@ -347,8 +384,6 @@ STDAPI DllRegisterServer(VOID)
     typeLib->Release();
 #endif
 
-    CoTaskMemFree((void *)psz_CLSID);
-
     return S_OK;
 };
 
index 86ca913d316237f076ffada8c556aa86b610c412..934cc0d6fd538bc2dea8598d614603d8cb21d96c 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * plugin.cpp: ActiveX control for VLC
  *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
+ * Copyright (C) 2006 the VideoLAN team
  *
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
  *
@@ -100,9 +100,10 @@ static LRESULT CALLBACK VLCVideoClassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam
     }
 };
 
-VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance) :
+VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID rclsid) :
     _p_class_ref(p_class_ref),
     _hinstance(hInstance),
+    _classid(rclsid),
     _inplace_picture(NULL)
 {
     WNDCLASS wClass;
@@ -248,9 +249,9 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
     _videownd(NULL),
     _p_class(p_class),
     _i_ref(1UL),
+    _p_libvlc(NULL),
     _i_codepage(CP_ACP),
-    _b_usermode(TRUE),
-    _i_vlc(0)
+    _b_usermode(TRUE)
 {
     p_class->AddRef();
 
@@ -339,6 +340,8 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
         *ppv = reinterpret_cast<LPVOID>(vlcControl);
     else if( IID_IVLCControl == riid )
         *ppv = reinterpret_cast<LPVOID>(vlcControl);
+    else if( IID_IVLCControl2 == riid )
+        *ppv = reinterpret_cast<LPVOID>(vlcControl2);
     else if( IID_IViewObject == riid )
         *ppv = reinterpret_cast<LPVOID>(vlcViewObject);
     else if( IID_IViewObject2 == riid )
@@ -465,7 +468,7 @@ static void getViewportCoords(LPRECT lprPosRect, LPRECT lprClipRect)
 
 HRESULT VLCPlugin::onInit(void)
 {
-    if( 0 == _i_vlc )
+    if( NULL == _p_libvlc )
     {
         // initialize persistable properties
         _bstr_mrl = NULL;
@@ -540,21 +543,29 @@ HRESULT VLCPlugin::onLoad(void)
     return S_OK;
 };
 
-HRESULT VLCPlugin::getVLCObject(int *i_vlc)
+HRESULT VLCPlugin::getVLCObject(inti_vlc)
 {
-    if( ! isRunning() )
+    libvlc_instance_t *p_libvlc;
+    HRESULT result = getVLC(&p_libvlc);
+    if( SUCCEEDED(result) )
     {
-        _i_vlc = VLC_Create();
-        if( _i_vlc < 0 )
-        {
-            _i_vlc = 0;
-            return E_FAIL;
-        }
+        *i_vlc = libvlc_get_vlc_id(p_libvlc);
+    }
+    else
+    {
+        *i_vlc = 0;
+    }
+    return result;
+}
 
+HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
+{
+    if( ! isRunning() )
+    {
         /*
         ** default initialization options
         */
-        char *ppsz_argv[10] = { "vlc", };
+        char *ppsz_argv[32] = { "vlc" };
         int   ppsz_argc = 1;
 
         HKEY h_key;
@@ -575,17 +586,38 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc)
              RegCloseKey( h_key );
         }
 
-#if 0
-        ppsz_argv[0] = "C:\\cygwin\\home\\Damien_Fouilleul\\dev\\videolan\\vlc-trunk\\vlc";
+#if 1
+        //ppsz_argv[0] = "C:\\cygwin\\home\\Damien_Fouilleul\\dev\\videolan\\vlc-trunk\\vlc";
+        ppsz_argv[0] = "C:\\cygwin\\home\\damienf\\vlc-trunk\\vlc";
 #endif
 
         // make sure plugin isn't affected with VLC single instance mode
         ppsz_argv[ppsz_argc++] = "--no-one-instance";
 
+        /* common settings */
+        ppsz_argv[ppsz_argc++] = "-vv";
+        ppsz_argv[ppsz_argc++] = "--no-stats";
+        ppsz_argv[ppsz_argc++] = "--no-media-library";
+        ppsz_argv[ppsz_argc++] = "--intf";
+        ppsz_argv[ppsz_argc++] = "dummy";
+
         // loop mode is a configuration option only
         if( _b_autoloop )
             ppsz_argv[ppsz_argc++] = "--loop";
 
+        // initial volume setting
+        char volBuffer[16];
+        ppsz_argv[ppsz_argc++] = "--volume";
+        if( _b_mute )
+        {
+           ppsz_argv[ppsz_argc++] = "0";
+        }
+        else
+        {
+            snprintf(volBuffer, sizeof(volBuffer), "%d", _i_volume);
+            ppsz_argv[ppsz_argc++] = volBuffer;
+        }
+            
         if( IsDebuggerPresent() )
         {
             /*
@@ -600,36 +632,31 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc)
             ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1";
         }
 
-        if( VLC_Init(_i_vlc, ppsz_argc, ppsz_argv) )
+        _p_libvlc = libvlc_new(ppsz_argc, ppsz_argv, NULL);
+        if( NULL == _p_libvlc )
         {
-            VLC_Destroy(_i_vlc);
-            _i_vlc = 0;
+            *pp_libvlc = NULL;
             return E_FAIL;
         }
 
-        VLC_VolumeSet(_i_vlc, _i_volume);
-
-        if( _b_mute )
-            VLC_VolumeMute(_i_vlc);
-
         char *psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
         if( NULL != psz_mrl )
         {
-            char timeBuffer[32];
             const char *options[1];
-            int   cOptions = 0;
+            int i_options = 0;
 
+            char timeBuffer[32];
             if( _i_time )
             {
                 snprintf(timeBuffer, sizeof(timeBuffer), ":start-time=%d", _i_time);
-                options[cOptions++] = timeBuffer;
+                options[i_options++] = timeBuffer;
             }
             // add default target to playlist
-            VLC_AddTarget(_i_vlc, psz_mrl, options, cOptions, PLAYLIST_APPEND, PLAYLIST_END);
+            libvlc_playlist_add_extended(_p_libvlc, psz_mrl, NULL, i_options, options, NULL);
             CoTaskMemFree(psz_mrl);
         }
     }
-    *i_vlc = _i_vlc;
+    *pp_libvlc = _p_libvlc;
     return S_OK;
 };
 
@@ -721,13 +748,12 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
     }
     if( isRunning() )
     {
-        int i_vlc = _i_vlc;
+        libvlc_instance_t* p_libvlc = _p_libvlc;
 
-        _i_vlc = 0;
+        _p_libvlc = NULL;
         vlcDataObject->onClose();
 
-        VLC_CleanUp(i_vlc);
-        VLC_Destroy(i_vlc);
+        libvlc_destroy(p_libvlc);
     }
     return S_OK;
 };
@@ -806,26 +832,24 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
     if( _b_usermode )
     {
         /* will run vlc if not done already */
-        int i_vlc;
-        HRESULT result = getVLCObject(&i_vlc);
+        libvlc_instance_t* p_libvlc;
+        HRESULT result = getVLC(&p_libvlc);
         if( FAILED(result) )
             return result;
 
         /* set internal video width and height */
-        vlc_value_t val;
-        val.i_int = posRect.right-posRect.left;
-        VLC_VariableSet(i_vlc, "conf::width", val);
-        val.i_int = posRect.bottom-posRect.top;
-        VLC_VariableSet(i_vlc, "conf::height", val);
+        libvlc_video_set_size(p_libvlc,
+            posRect.right-posRect.left,
+            posRect.bottom-posRect.top,
+            NULL );
 
         /* set internal video parent window */
-        /* horrible cast there */
-        val.i_int = reinterpret_cast<int>(_videownd);
-        VLC_VariableSet(i_vlc, "drawable", val);
+        libvlc_video_set_parent(p_libvlc,
+            reinterpret_cast<libvlc_drawable_t>(_videownd), NULL);
 
-        if( _b_autoplay & (VLC_PlaylistNumberOfItems(i_vlc) > 0) )
+        if( _b_autoplay & (libvlc_playlist_items_count(p_libvlc, NULL) > 0) )
         {
-            VLC_Play(i_vlc);
+            libvlc_playlist_play(p_libvlc, 0, 0, NULL, NULL);
             fireOnPlayEvent();
         }
     }
@@ -840,7 +864,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
 {
     if( isRunning() )
     {
-        VLC_Stop(_i_vlc);
+        libvlc_playlist_stop(_p_libvlc, NULL);
         fireOnStopEvent();
     }
 
@@ -880,7 +904,7 @@ void VLCPlugin::setVolume(int volume)
         _i_volume = volume;
         if( isRunning() )
         {
-            VLC_VolumeSet(_i_vlc, _i_volume);
+            libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL);
         }
         setDirty(TRUE);
     }
@@ -896,7 +920,12 @@ void VLCPlugin::setTime(int seconds)
         _i_time = seconds;
         if( isRunning() )
         {
-            VLC_TimeSet(_i_vlc, seconds, VLC_FALSE);
+            libvlc_input_t *p_input = libvlc_playlist_get_input(_p_libvlc, NULL);
+            if( NULL != p_input )
+            {
+                libvlc_input_set_time(p_input, _i_time, NULL);
+                libvlc_input_free(p_input);
+            }
         }
         setDirty(TRUE);
     }
@@ -1065,11 +1094,13 @@ void VLCPlugin::onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
             SWP_NOOWNERZORDER );
 
     //RedrawWindow(_videownd, &posRect, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN);
-    vlc_value_t val;
-    val.i_int = posRect.right-posRect.left;
-    VLC_VariableSet(_i_vlc, "conf::width", val);
-    val.i_int = posRect.bottom-posRect.top;
-    VLC_VariableSet(_i_vlc, "conf::height", val);
+    if( isRunning() )
+    {
+        libvlc_video_set_size(_p_libvlc,
+            posRect.right-posRect.left,
+            posRect.bottom-posRect.top,
+            NULL );
+    }
 };
 
 void VLCPlugin::freezeEvents(BOOL freeze)
index 1dba8151eba40fedd388a015f278383933dbb032..94a4abe64d3b66dacf61b8b5217e054cc6de5b7b 100644 (file)
 #include <ole2.h>
 #include <olectl.h>
 
-#include <vlc/vlc.h>
+#include <vlc/libvlc.h>
 
 extern const GUID CLSID_VLCPlugin; 
+extern const GUID CLSID_VLCPlugin2; 
 extern const GUID LIBID_AXVLC; 
 extern const GUID DIID_DVLCEvents; 
 
@@ -37,7 +38,7 @@ class VLCPluginClass : public IClassFactory
 
 public:
 
-    VLCPluginClass(LONG *p_class_ref,HINSTANCE hInstance);
+    VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID rclsid);
 
     /* IUnknown methods */
     STDMETHODIMP QueryInterface(REFIID riid, void **ppv);
@@ -48,6 +49,8 @@ public:
     STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv);
     STDMETHODIMP LockServer(BOOL fLock);
 
+    REFCLSID getClassID(void) { return (REFCLSID)_classid; };
+
     LPCSTR getInPlaceWndClassName(void) const { return TEXT("VLC Plugin In-Place"); };
     LPCSTR getVideoWndClassName(void) const { return TEXT("VLC Plugin Video"); };
     HINSTANCE getHInstance(void) const { return _hinstance; };
@@ -62,6 +65,7 @@ private:
 
     LPLONG      _p_class_ref;
     HINSTANCE   _hinstance;
+    CLSID       _classid;
     ATOM        _inplace_wndclass_atom;
     ATOM        _video_wndclass_atom;
     LPPICTURE   _inplace_picture;
@@ -81,7 +85,7 @@ public:
 
     /* custom methods */
     HRESULT getTypeLib(LCID lcid, ITypeLib **pTL) { return LoadRegTypeLib(LIBID_AXVLC, 1, 0, lcid, pTL); };
-    REFCLSID getClassID(void) { return (REFCLSID)CLSID_VLCPlugin; };
+    REFCLSID getClassID(void) { return _p_class->getClassID(); };
     REFIID getDispEventID(void) { return (REFIID)DIID_DVLCEvents; };
 
     /*
@@ -165,9 +169,9 @@ public:
     inline BOOL isDirty(void) { return _b_dirty; };
     inline void setDirty(BOOL dirty) { _b_dirty = dirty; };
 
-    inline BOOL isRunning(void) { return 0 != _i_vlc; };
+    inline BOOL isRunning(void) { return NULL != _p_libvlc; };
     HRESULT getVLCObject(int *i_vlc);
-
+    HRESULT getVLC(libvlc_instance_t** p_vlc);
 
     // control geometry within container
     RECT getPosRect(void) { return _posRect; }; 
@@ -218,6 +222,7 @@ private:
     class VLCConnectionPointContainer *vlcConnectionPointContainer;
     class VLCObjectSafety *vlcObjectSafety;
     class VLCControl *vlcControl;
+    class VLCControl2 *vlcControl2;
     class VLCViewObject *vlcViewObject;
     class VLCDataObject *vlcDataObject;
 
@@ -226,12 +231,12 @@ private:
     // video window (Drawing window)
     HWND _videownd;
 
-    VLCPluginClass *_p_class;
+    VLCPluginClass_p_class;
     ULONG _i_ref;
 
+    libvlc_instance_t* _p_libvlc;
     UINT _i_codepage;
     BOOL _b_usermode;
-    int  _i_vlc;
     RECT _posRect;
 
     // persistable properties
index 6ac068130158b4a0b6a070fb6ab5d7c86f4efe2b..fdad6d4173573238bd4b91f3a52790f9b06b463a 100644 (file)
@@ -70,6 +70,28 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s)
     return NULL;
 };
 
+char *CStrFromGUID(REFGUID clsid)
+{
+    LPOLESTR oleStr;
+
+    if( FAILED(StringFromIID(clsid, &oleStr)) )
+        return NULL;
+
+#ifdef OLE2ANSI
+    return (LPCSTR)oleStr;
+#else
+    char *pct_CLSID = NULL;
+    size_t len = WideCharToMultiByte(CP_ACP, 0, oleStr, -1, NULL, 0, NULL, NULL);
+    if( len > 0 )
+    {
+        pct_CLSID = (char *)CoTaskMemAlloc(len);
+        WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len, NULL, NULL);
+    }
+    CoTaskMemFree(oleStr);
+    return pct_CLSID;
+#endif
+};
+
 /*
 **  properties
 */
index 0a4c62460a179a6264c7e31e631ac0bf2e4f86a3..11121310848a1ae1880d57f6f10748289e9be7bd 100644 (file)
@@ -31,6 +31,8 @@
 extern char *CStrFromBSTR(UINT codePage, BSTR bstr);
 extern BSTR BSTRFromCStr(UINT codePage, LPCSTR s);
 
+extern char *CStrFromGUID(REFGUID clsid);
+
 // properties
 extern HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v);
 
index 12da4eac3b0d3dc31d0c7ba980d8bcca665b214c..484c0dea9d611df09eed99f78a298a6a0e7592cb 100644 (file)
@@ -529,7 +529,7 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value)
     return hr;
 };
 
-static void freeTargetOptions(char **cOptions, int cOptionCount)
+void VLCControl::FreeTargetOptions(char **cOptions, int cOptionCount)
 {
     // clean up 
     if( NULL != cOptions )
@@ -546,7 +546,7 @@ static void freeTargetOptions(char **cOptions, int cOptionCount)
     }
 };
 
-static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount)
+HRESULT VLCControl::CreateTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount)
 {
     HRESULT hr = E_INVALIDARG;
     if( VT_ERROR == V_VT(options) )
@@ -621,7 +621,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
                     if( FAILED(hr) )
                     {
                         // free already processed elements
-                        freeTargetOptions(*cOptions, *cOptionCount);
+                        FreeTargetOptions(*cOptions, *cOptionCount);
                     }
                 }
                 else
@@ -715,7 +715,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
             if( FAILED(hr) )
             {
                 // free already processed elements
-                freeTargetOptions(*cOptions, *cOptionCount);
+                FreeTargetOptions(*cOptions, *cOptionCount);
             }
         }
         else
@@ -750,7 +750,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
         int cOptionsCount;
         char **cOptions;
 
-        if( FAILED(createTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) )
+        if( FAILED(CreateTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) )
             return E_INVALIDARG;
 
         if( VLC_SUCCESS <= VLC_AddTarget(i_vlc, cUri, (const char **)cOptions, cOptionsCount, mode, position) )
@@ -766,7 +766,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
                 _p_instance->fireOnStopEvent();
         }
 
-        freeTargetOptions(cOptions, cOptionsCount);
+        FreeTargetOptions(cOptions, cOptionsCount);
         CoTaskMemFree(cUri);
     }
     return hr;
index a45abdb7c3bfbf15925b947e8cdf7d104eceb3be..79a30397eebb4b2da8e58755b65cadfc5239456d 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef _VLCCONTROL_H_
 #define _VLCCONTROL_H_
 
-#include <oaidl.h>
 #include "axvlc_idl.h"
 
 class VLCControl : public IVLCControl
@@ -94,6 +93,9 @@ public:
     STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay);
     STDMETHODIMP put_AutoPlay(VARIANT_BOOL autoplay);
  
+    static HRESULT CreateTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount);
+    static void FreeTargetOptions(char **cOptions, int cOptionCount);
+
 private:
 
     HRESULT      getTypeInfo();
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
new file mode 100755 (executable)
index 0000000..a74c3ca
--- /dev/null
@@ -0,0 +1,1247 @@
+/*****************************************************************************
+ * vlccontrol2.cpp: ActiveX control for VLC
+ *****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ *
+ * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "plugin.h"
+#include "vlccontrol2.h"
+#include "vlccontrol.h"
+
+#include "utils.h"
+
+using namespace std;
+
+VLCAudio::~VLCAudio()
+{
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCAudio::getTypeInfo(void)
+{
+    HRESULT hr = NOERROR;
+    if( NULL == _p_typeinfo )
+    {
+        ITypeLib *p_typelib;
+
+        hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);
+        if( SUCCEEDED(hr) )
+        {
+            hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCAudio, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCAudio::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
+{
+    if( NULL == ppTInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        _p_typeinfo->AddRef();
+        *ppTInfo = _p_typeinfo;
+        return NOERROR;
+    }
+    *ppTInfo = NULL;
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCAudio::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, 
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCAudio::Invoke(DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
+        VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams,
+                pVarResult, pExcepInfo, puArgErr);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute)
+{
+    if( NULL == mute )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        *mute = libvlc_audio_get_mute(p_libvlc, &ex) ? VARIANT_TRUE : VARIANT_FALSE;
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCAudio::put_mute(VARIANT_BOOL mute)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_audio_set_mute(p_libvlc, VARIANT_FALSE != mute, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCAudio::get_volume(int* volume)
+{
+    if( NULL == volume )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        *volume = libvlc_audio_get_volume(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCAudio::put_volume(int volume)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_audio_set_volume(p_libvlc, volume, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCAudio::toggleMute()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_audio_toggle_mute(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+/*******************************************************************************/
+
+VLCInput::~VLCInput()
+{
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCInput::getTypeInfo(void)
+{
+    HRESULT hr = NOERROR;
+    if( NULL == _p_typeinfo )
+    {
+        ITypeLib *p_typelib;
+
+        hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);
+        if( SUCCEEDED(hr) )
+        {
+            hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCInput, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
+{
+    if( NULL == ppTInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        _p_typeinfo->AddRef();
+        *ppTInfo = _p_typeinfo;
+        return NOERROR;
+    }
+    *ppTInfo = NULL;
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCInput::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, 
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCInput::Invoke(DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
+        VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams,
+                pVarResult, pExcepInfo, puArgErr);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCInput::get_length(__int64* length)
+{
+    if( NULL == length )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *length = (__int64)libvlc_input_get_length(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_position(float* position)
+{
+    if( NULL == position )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *position = libvlc_input_get_position(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::put_position(float position)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            libvlc_input_set_position(p_input, position, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_time(__int64* time)
+{
+    if( NULL == time )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *time = libvlc_input_get_time(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::put_time(__int64 time)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            libvlc_input_set_time(p_input, time, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_state(int* state)
+{
+    if( NULL == state )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *state = libvlc_input_get_state(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        // don't fail, just return the idle state
+        *state = 0;
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_rate(float* rate)
+{
+    if( NULL == rate )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *rate = libvlc_input_get_rate(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::put_rate(float rate)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            libvlc_input_set_rate(p_input, rate, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_fps(float* fps)
+{
+    if( NULL == fps )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *fps = libvlc_input_get_fps(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
+{
+    if( NULL == hasVout )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *hasVout = libvlc_input_has_vout(p_input, &ex) ? VARIANT_TRUE : VARIANT_FALSE;
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+/*******************************************************************************/
+
+VLCPlaylist::~VLCPlaylist()
+{
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCPlaylist::getTypeInfo(void)
+{
+    HRESULT hr = NOERROR;
+    if( NULL == _p_typeinfo )
+    {
+        ITypeLib *p_typelib;
+
+        hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);
+        if( SUCCEEDED(hr) )
+        {
+            hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCPlaylist, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
+{
+    if( NULL == ppTInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        _p_typeinfo->AddRef();
+        *ppTInfo = _p_typeinfo;
+        return NOERROR;
+    }
+    *ppTInfo = NULL;
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCPlaylist::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, 
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCPlaylist::Invoke(DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
+        VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams,
+                pVarResult, pExcepInfo, puArgErr);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCPlaylist::get_itemCount(int* count)
+{
+    if( NULL == count )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        *count = libvlc_playlist_items_count(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
+{
+    if( NULL == isPlaying )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        *isPlaying = libvlc_playlist_isplaying(p_libvlc, &ex) ? VARIANT_TRUE: VARIANT_FALSE;
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::add(BSTR uri, BSTR name, VARIANT options, int* item)
+{
+    if( NULL == item )
+        return E_POINTER;
+
+    if( 0 == SysStringLen(uri) )
+        return E_INVALIDARG;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        int i_options;
+        char **ppsz_options;
+
+        hr = VLCControl::CreateTargetOptions(CP_UTF8, &options, &ppsz_options, &i_options);
+        if( FAILED(hr) )
+            return hr;
+
+        char *psz_uri = CStrFromBSTR(CP_UTF8, uri);
+        if( NULL == psz_uri )
+        {
+            VLCControl::FreeTargetOptions(ppsz_options, i_options);
+            return E_OUTOFMEMORY;
+        }
+
+        char *psz_name = NULL;
+        if( SysStringLen(name) > 0 )
+        {
+            psz_name = CStrFromBSTR(CP_UTF8, name);
+        }
+
+        *item = libvlc_playlist_add_extended(p_libvlc,
+            psz_uri,
+            psz_name,
+            i_options,
+            const_cast<const char **>(ppsz_options),
+            &ex);
+
+        VLCControl::FreeTargetOptions(ppsz_options, i_options);
+        CoTaskMemFree(psz_uri);
+        if( psz_name )
+            CoTaskMemFree(psz_name);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::play()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_play(p_libvlc, -1, 0, NULL, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::playItem(int item)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_play(p_libvlc, item, 0, NULL, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::togglePause()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_pause(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::stop()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_stop(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::next()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_next(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::prev()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_prev(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::clear()
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_clear(p_libvlc, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCPlaylist::removeItem(int item)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_playlist_delete_item(p_libvlc, item, &ex);
+        if( libvlc_exception_raised(&ex) )
+        {
+            libvlc_exception_clear(&ex);
+            return E_FAIL;
+        }
+        return NOERROR;
+    }
+    return hr;
+};
+
+/*******************************************************************************/
+
+VLCVideo::~VLCVideo()
+{
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCVideo::getTypeInfo(void)
+{
+    HRESULT hr = NOERROR;
+    if( NULL == _p_typeinfo )
+    {
+        ITypeLib *p_typelib;
+
+        hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);
+        if( SUCCEEDED(hr) )
+        {
+            hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCVideo, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCVideo::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
+{
+    if( NULL == ppTInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        _p_typeinfo->AddRef();
+        *ppTInfo = _p_typeinfo;
+        return NOERROR;
+    }
+    *ppTInfo = NULL;
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCVideo::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, 
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCVideo::Invoke(DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
+        VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams,
+                pVarResult, pExcepInfo, puArgErr);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen)
+{
+    if( NULL == fullscreen )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *fullscreen = libvlc_get_fullscreen(p_input, &ex) ? VARIANT_TRUE : VARIANT_FALSE;
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCVideo::put_fullscreen(VARIANT_BOOL fullscreen)
+{
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            libvlc_set_fullscreen(p_input, VARIANT_FALSE != fullscreen, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCVideo::get_width(int* width)
+{
+    if( NULL == width )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *width = libvlc_video_get_width(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCVideo::get_height(int* height)
+{
+    if( NULL == height )
+        return E_POINTER;
+
+    libvlc_instance_t* p_libvlc;
+    HRESULT hr = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_input_t *p_input = libvlc_playlist_get_input(p_libvlc, &ex);
+        if( ! libvlc_exception_raised(&ex) )
+        {
+            *height = libvlc_video_get_height(p_input, &ex);
+            libvlc_input_free(p_input);
+            if( ! libvlc_exception_raised(&ex) )
+            {
+                return NOERROR;
+            }
+        }
+        libvlc_exception_clear(&ex);
+        return E_FAIL;
+    }
+    return hr;
+};
+
+/*******************************************************************************/
+
+VLCControl2::VLCControl2(VLCPlugin *p_instance) :
+    _p_instance(p_instance),
+    _p_typeinfo(NULL),
+    _p_vlcaudio(NULL),
+    _p_vlcinput(NULL),
+    _p_vlcplaylist(NULL),
+    _p_vlcvideo(NULL)
+{
+    _p_vlcaudio     = new VLCAudio(p_instance);
+    _p_vlcinput     = new VLCInput(p_instance);
+    _p_vlcplaylist  = new VLCPlaylist(p_instance);
+    _p_vlcvideo     = new VLCVideo(p_instance);
+};
+
+VLCControl2::~VLCControl2()
+{
+    delete _p_vlcvideo;
+    delete _p_vlcplaylist;
+    delete _p_vlcinput;
+    delete _p_vlcaudio;
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCControl2::getTypeInfo(void)
+{
+    HRESULT hr = NOERROR;
+    if( NULL == _p_typeinfo )
+    {
+        ITypeLib *p_typelib;
+
+        hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);
+        if( SUCCEEDED(hr) )
+        {
+            hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCControl2, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCControl2::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
+{
+    if( NULL == ppTInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        _p_typeinfo->AddRef();
+        *ppTInfo = _p_typeinfo;
+        return NOERROR;
+    }
+    *ppTInfo = NULL;
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCControl2::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, 
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCControl2::Invoke(DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
+        VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+{
+    if( SUCCEEDED(getTypeInfo()) )
+    {
+        return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams,
+                pVarResult, pExcepInfo, puArgErr);
+    }
+    return E_NOTIMPL;
+};
+
+STDMETHODIMP VLCControl2::get_audio(IVLCAudio** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlcaudio;
+    if( NULL != _p_vlcaudio )
+    {
+        _p_vlcaudio->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+};
+
+STDMETHODIMP VLCControl2::get_input(IVLCInput** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlcinput;
+    if( NULL != _p_vlcinput )
+    {
+        _p_vlcinput->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+};
+
+STDMETHODIMP VLCControl2::get_playlist(IVLCPlaylist** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlcplaylist;
+    if( NULL != _p_vlcplaylist )
+    {
+        _p_vlcplaylist->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+};
+
+STDMETHODIMP VLCControl2::get_video(IVLCVideo** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlcvideo;
+    if( NULL != _p_vlcvideo )
+    {
+        _p_vlcvideo->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+};
+
diff --git a/activex/vlccontrol2.h b/activex/vlccontrol2.h
new file mode 100755 (executable)
index 0000000..c3d1c1f
--- /dev/null
@@ -0,0 +1,292 @@
+/*****************************************************************************
+ * vlccontrol.h: ActiveX control for VLC
+ *****************************************************************************
+ * Copyright (C) 2005 the VideoLAN team
+ *
+ * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _VLCCONTROL2_H_
+#define _VLCCONTROL2_H_
+
+#include "axvlc_idl.h"
+
+class VLCAudio : public IVLCAudio
+{
+    
+public:
+
+    VLCAudio(VLCPlugin *p_instance) :  _p_instance(p_instance), _p_typeinfo(NULL) {};
+    virtual ~VLCAudio();
+
+    // IUnknown methods
+    STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+    {
+        if( NULL == ppv )
+          return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IDispatch == riid)
+         || (IID_IVLCAudio == riid) )
+        {
+            AddRef();
+            *ppv = reinterpret_cast<LPVOID>(this);
+            return NOERROR;
+        }
+        // behaves as a standalone object
+        return E_NOINTERFACE;
+    };
+
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
+
+    // IDispatch methods
+    STDMETHODIMP GetTypeInfoCount(UINT*);
+    STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
+    STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+
+    // IVLCAudio methods
+    STDMETHODIMP get_mute(VARIANT_BOOL*);
+    STDMETHODIMP put_mute(VARIANT_BOOL);
+    STDMETHODIMP get_volume(int*);
+    STDMETHODIMP put_volume(int);
+    STDMETHODIMP toggleMute();
+    
+private:
+
+    HRESULT      getTypeInfo();
+
+    VLCPlugin *_p_instance;
+    ITypeInfo *_p_typeinfo;
+
+};
+class VLCInput : public IVLCInput
+{
+    
+public:
+
+    VLCInput(VLCPlugin *p_instance) :  _p_instance(p_instance), _p_typeinfo(NULL) {};
+    virtual ~VLCInput();
+
+    // IUnknown methods
+    STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+    {
+        if( NULL == ppv )
+          return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IDispatch == riid)
+         || (IID_IVLCInput == riid) )
+        {
+            AddRef();
+            *ppv = reinterpret_cast<LPVOID>(this);
+            return NOERROR;
+        }
+        // behaves as a standalone object
+        return E_NOINTERFACE;
+    };
+
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
+
+    // IDispatch methods
+    STDMETHODIMP GetTypeInfoCount(UINT*);
+    STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
+    STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+
+    // IVLCInput methods
+    STDMETHODIMP get_length(__int64*);
+    STDMETHODIMP get_position(float*);
+    STDMETHODIMP put_position(float);
+    STDMETHODIMP get_time(__int64*);
+    STDMETHODIMP put_time(__int64);
+    STDMETHODIMP get_state(int*);
+    STDMETHODIMP get_rate(float*);
+    STDMETHODIMP put_rate(float);
+    STDMETHODIMP get_fps(float*);
+    STDMETHODIMP get_hasVout(VARIANT_BOOL*);
+     
+private:
+
+    HRESULT      getTypeInfo();
+
+    VLCPlugin *_p_instance;
+    ITypeInfo *_p_typeinfo;
+
+};
+class VLCPlaylist : public IVLCPlaylist
+{
+    
+public:
+
+    VLCPlaylist(VLCPlugin *p_instance) :  _p_instance(p_instance), _p_typeinfo(NULL) {};
+    virtual ~VLCPlaylist();
+
+    // IUnknown methods
+    STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+    {
+        if( NULL == ppv )
+          return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IDispatch == riid)
+         || (IID_IVLCPlaylist == riid) )
+        {
+            AddRef();
+            *ppv = reinterpret_cast<LPVOID>(this);
+            return NOERROR;
+        }
+        // behaves as a standalone object
+        return E_NOINTERFACE;
+    };
+
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
+
+    // IDispatch methods
+    STDMETHODIMP GetTypeInfoCount(UINT*);
+    STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
+    STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+
+    // IVLCPlaylist methods
+    STDMETHODIMP get_itemCount(int*);
+    STDMETHODIMP get_isPlaying(VARIANT_BOOL*);
+    STDMETHODIMP add(BSTR, BSTR, VARIANT, int*);
+    STDMETHODIMP play();
+    STDMETHODIMP playItem(int);
+    STDMETHODIMP togglePause();
+    STDMETHODIMP stop();
+    STDMETHODIMP next();
+    STDMETHODIMP prev();
+    STDMETHODIMP clear();
+    STDMETHODIMP removeItem(int);
+private:
+
+    HRESULT      getTypeInfo();
+
+    VLCPlugin *_p_instance;
+    ITypeInfo *_p_typeinfo;
+
+};
+class VLCVideo : public IVLCVideo
+{
+    
+public:
+
+    VLCVideo(VLCPlugin *p_instance) :  _p_instance(p_instance), _p_typeinfo(NULL) {};
+    virtual ~VLCVideo();
+
+    // IUnknown methods
+    STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+    {
+        if( NULL == ppv )
+          return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IDispatch == riid)
+         || (IID_IVLCVideo == riid) )
+        {
+            AddRef();
+            *ppv = reinterpret_cast<LPVOID>(this);
+            return NOERROR;
+        }
+        // behaves as a standalone object
+        return E_NOINTERFACE;
+    };
+
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
+
+    // IDispatch methods
+    STDMETHODIMP GetTypeInfoCount(UINT*);
+    STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
+    STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+
+    // IVLCVideo methods
+    STDMETHODIMP get_fullscreen(VARIANT_BOOL*);
+    STDMETHODIMP put_fullscreen(VARIANT_BOOL);
+    STDMETHODIMP get_width(int*);
+    STDMETHODIMP get_height(int*);
+private:
+
+    HRESULT      getTypeInfo();
+
+    VLCPlugin *_p_instance;
+    ITypeInfo *_p_typeinfo;
+
+};
+class VLCControl2 : public IVLCControl2
+{
+    
+public:
+
+    VLCControl2(VLCPlugin *p_instance);
+    virtual ~VLCControl2();
+
+    // IUnknown methods
+    STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
+    {
+        if( NULL == ppv )
+          return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IDispatch == riid)
+         || (IID_IVLCControl2 == riid) )
+        {
+            AddRef();
+            *ppv = reinterpret_cast<LPVOID>(this);
+            return NOERROR;
+        }
+        return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
+    };
+
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
+
+    // IDispatch methods
+    STDMETHODIMP GetTypeInfoCount(UINT*);
+    STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
+    STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+
+    // IVLCControl2 methods
+    STDMETHODIMP get_audio(IVLCAudio**);
+    STDMETHODIMP get_input(IVLCInput**);
+    STDMETHODIMP get_playlist(IVLCPlaylist**);
+    STDMETHODIMP get_video(IVLCVideo**);
+private:
+
+    HRESULT      getTypeInfo();
+
+    VLCPlugin*      _p_instance;
+    ITypeInfo*      _p_typeinfo;
+
+    VLCAudio*       _p_vlcaudio;
+    VLCInput*       _p_vlcinput;
+    VLCPlaylist*    _p_vlcplaylist;
+    VLCVideo*       _p_vlcvideo;
+};
+#endif
+