Commit 3ef49160 authored by Damien Fouilleul's avatar Damien Fouilleul

- ActiveX: support for libvlc and common scripting APIS, widl has replaced...

- ActiveX: support for libvlc and common scripting APIS, widl has replaced midl as default IDL compiler
parent c3a1a371
...@@ -38,6 +38,8 @@ SOURCES_activex = \ ...@@ -38,6 +38,8 @@ SOURCES_activex = \
viewobject.h \ viewobject.h \
vlccontrol.cpp \ vlccontrol.cpp \
vlccontrol.h \ vlccontrol.h \
vlccontrol2.cpp \
vlccontrol2.h \
plugin.cpp \ plugin.cpp \
plugin.h \ plugin.h \
axvlc_idl.c \ axvlc_idl.c \
...@@ -100,10 +102,20 @@ axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl ...@@ -100,10 +102,20 @@ axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
clean-tlb: clean-tlb:
rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h 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 else
clean-tlb: clean-tlb:
endif
endif endif
DATA_axvlc_rc = $(noinst_axvlc_rc_DATA) DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
...@@ -125,14 +137,13 @@ endif ...@@ -125,14 +137,13 @@ endif
clean-stamp: clean-stamp:
rm -f stamp-pic rm -f stamp-pic
stamp-pic: FORCE if BUILD_SHARED
@for dep in "" `$(VLC_CONFIG) --target builtin`; do \ stamp-pic:
if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \ else
rm -f $@; \ stamp-pic: $(shell $(VLC_CONFIG) --target builtin)
break; \ endif
fi; \ @touch $@
done
@if test ! -f $@; then printf "" > $@; fi
############################################################################### ###############################################################################
# Clean rules # Clean rules
...@@ -142,7 +153,6 @@ clean-local: clean-stamp clean-tlb ...@@ -142,7 +153,6 @@ clean-local: clean-stamp clean-tlb
rm -f axvlc$(LIBEXT) rm -f axvlc$(LIBEXT)
############################################################################### ###############################################################################
# Force rule # Force rules
############################################################################### ###############################################################################
FORCE:
/***************************************************************************** /*****************************************************************************
* axvlc.idl: ActiveX control for VLC * axvlc.idl: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 the VideoLAN team * Copyright (C) 2006 the VideoLAN team
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
...@@ -23,19 +23,23 @@ ...@@ -23,19 +23,23 @@
//comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t] //comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t]
//Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t] //Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]
import "oaidl.idl";
[ [
uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6), uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
version(1.0), version(1.0),
helpstring("VideoLAN VLC ActiveX Plugin"), helpstring("VideoLAN VLC ActiveX Plugin")
] ]
library AXVLC library AXVLC
{ {
importlib("stdole2.tlb");
// Forward declare all types defined in this typelib // Forward declare all types defined in this typelib
interface IVLCControl; interface IVLCControl;
interface IVLCPlaylist;
interface ILibVLCControl;
dispinterface DVLCEvents; dispinterface DVLCEvents;
importlib("stdole2.tlb");
enum VLCPlaylistMode enum VLCPlaylistMode
{ {
VLCPlayListInsert = 1, VLCPlayListInsert = 1,
...@@ -64,7 +68,7 @@ library AXVLC ...@@ -64,7 +68,7 @@ library AXVLC
[ [
odl, odl,
uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1), uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
helpstring("VLC Control"), helpstring("VLC Control (deprecated)"),
dual, dual,
hidden, hidden,
oleautomation oleautomation
...@@ -166,14 +170,173 @@ library AXVLC ...@@ -166,14 +170,173 @@ library AXVLC
void stop(); void stop();
}; };
[
odl,
uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
helpstring("VLC Audio APIs"),
dual,
oleautomation
]
interface IVLCAudio : IDispatch
{
[propget, helpstring("Returns/sets the audio mute state.")]
HRESULT mute([out, retval] VARIANT_BOOL* muted);
[propput, helpstring("Returns/sets the audio mute state.")]
HRESULT mute([in] VARIANT_BOOL muted);
[propget, helpstring("Returns/sets audio volume as a percent value.")]
HRESULT volume([out, retval] int* volume);
[propput, helpstring("Returns/sets audio volume as a percent value.")]
HRESULT volume([in] int volume);
[helpstring("Mute/unmute audio playback.")]
HRESULT toggleMute();
};
[
odl,
uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
helpstring("VLC Input APIs"),
dual,
oleautomation
]
interface IVLCInput : IDispatch
{
[propget, helpstring("Returns the clip length, in milliseconds.")]
HRESULT length([out, retval] __int64* length);
[propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
HRESULT position([out, retval] float* position);
[propput, helpstring("Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0.")]
HRESULT position([in] float position);
[propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
HRESULT time([out, retval] __int64* time);
[propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
HRESULT time([in] __int64 time);
[propget, helpstring("Returns current playback state.")]
HRESULT state([out, retval] int* state);
[propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
HRESULT rate([out, retval] float* rate);
[propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
HRESULT rate([in] float rate);
[propget, helpstring("Returns current playback frames per seconds if available.")]
HRESULT fps([out, retval] float* fps);
[propget, helpstring("Returns whether current playback displays video.")]
HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
};
[
odl,
uuid(54613049-40BF-4035-9E70-0A9312C0188D),
helpstring("VLC Playlist APIs"),
dual,
oleautomation
]
interface IVLCPlaylist : IDispatch
{
[propget, helpstring("Returns number of items in playlist.")]
HRESULT itemCount([out, retval] int* count);
[propget, helpstring("Returns whether playback displays video.")]
HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);
[helpstring("Add a playlist item.")]
HRESULT add([in] BSTR uri, [in] BSTR name, [in, optional] VARIANT options, [out, retval] int* item);
[helpstring("Play/Resume the playlist.")]
HRESULT play();
[helpstring("Play item in playlist.")]
HRESULT playItem([in] int item);
[helpstring("Play/Pause current clip.")]
HRESULT togglePause();
[helpstring("Stop current clip.")]
HRESULT stop();
[helpstring("Advance to next item in playlist.")]
HRESULT next();
[helpstring("Advance to previous item in playlist.")]
HRESULT prev();
[helpstring("Remove all items from playlist.")]
HRESULT clear();
[helpstring("remove item from playlist.")]
HRESULT removeItem([in] int item);
};
[
odl,
uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),
helpstring("VLC Video APIs"),
dual,
oleautomation
]
interface IVLCVideo : IDispatch
{
[propget, helpstring("Returns/sets the fullscreen state.")]
HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);
[propput, helpstring("Returns/sets the fullscreen state.")]
HRESULT fullscreen([in] VARIANT_BOOL fullscreen);
[propget, helpstring("Returns video original width.")]
HRESULT width([out, retval] int* width);
[propget, helpstring("Returns video original height.")]
HRESULT height([out, retval] int* height);
};
[
odl,
uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
helpstring("VLC Control"),
dual,
oleautomation
]
interface IVLCControl2 : IDispatch
{
[propget, helpstring("Returns the audio object.")]
HRESULT audio([out, retval] IVLCAudio** obj);
[propget, helpstring("Returns the audio object.")]
HRESULT input([out, retval] IVLCInput** obj);
[propget, helpstring("Returns the playlist object.")]
HRESULT playlist([out, retval] IVLCPlaylist** obj);
[propget, helpstring("Returns the audio object.")]
HRESULT video([out, retval] IVLCVideo** obj);
};
[ [
uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8), uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
helpstring("VLC control"), helpstring("VLC control (deprecated)"),
control control
] ]
coclass VLCPlugin coclass VLCPlugin
{ {
[default] interface IVLCControl; [default] interface IVLCControl;
interface IVLCControl2;
[default, source] dispinterface DVLCEvents;
};
[
uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),
helpstring("VLC control"),
control
]
coclass VLCPlugin2
{
[default] interface IVLCControl2;
interface IVLCControl;
[default, source] dispinterface DVLCEvents; [default, source] dispinterface DVLCEvents;
}; };
}; };
No preview for this file type
/* this file contains the actual definitions of */ /*** Autogenerated by WIDL 0.9.20 from axvlc.idl - Do not edit ***/
/* the IIDs and CLSIDs */
/* 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 #ifdef __cplusplus
extern "C"{ extern "C" {
#endif #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}};
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 #ifdef __cplusplus
} }
#endif #endif
/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /*** Autogenerated by WIDL 0.9.20 from axvlc.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.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( )
/* 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__
#ifndef __WIDL_AXVLC_IDL_H
#define __WIDL_AXVLC_IDL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C"{ extern "C" {
#endif #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__ #ifndef __IVLCControl_FWD_DEFINED__
#define __IVLCControl_FWD_DEFINED__ #define __IVLCControl_FWD_DEFINED__
typedef interface IVLCControl IVLCControl; 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__ #ifndef __DVLCEvents_FWD_DEFINED__
#define __DVLCEvents_FWD_DEFINED__ #define __DVLCEvents_FWD_DEFINED__
typedef interface DVLCEvents DVLCEvents; typedef interface DVLCEvents DVLCEvents;
#endif /* __DVLCEvents_FWD_DEFINED__ */ #endif
#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 )
#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__ #ifndef __IVLCControl_INTERFACE_DEFINED__
#define __IVLCControl_INTERFACE_DEFINED__ #define __IVLCControl_INTERFACE_DEFINED__
/* interface IVLCControl */ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x49,0x99,0xc1,0xc1);
/* [object][oleautomation][hidden][dual][helpstring][uuid] */
EXTERN_C const IID IID_IVLCControl;
#if defined(__cplusplus) && !defined(CINTERFACE) #if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCControl : public IDispatch
MIDL_INTERFACE("C2FA41D0-B113-476e-AC8C-9BD14999C1C1") {
IVLCControl : public IDispatch virtual HRESULT STDMETHODCALLTYPE get_Visible(
{ VARIANT_BOOL* visible) = 0;
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)
#define IVLCControl_Release(This) \ virtual HRESULT STDMETHODCALLTYPE put_Visible(
(This)->lpVtbl -> Release(This) VARIANT_BOOL visible) = 0;
virtual HRESULT STDMETHODCALLTYPE play(
) = 0;
#define IVLCControl_GetTypeInfoCount(This,pctinfo) \ virtual HRESULT STDMETHODCALLTYPE pause(
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) = 0;
#define IVLCControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ virtual HRESULT STDMETHODCALLTYPE stop(
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) = 0;
#define IVLCControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ virtual HRESULT STDMETHODCALLTYPE get_Playing(
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) VARIANT_BOOL* isPlaying) = 0;
#define IVLCControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ virtual HRESULT STDMETHODCALLTYPE get_Position(
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) float* position) = 0;
virtual HRESULT STDMETHODCALLTYPE put_Position(
float position) = 0;
#define IVLCControl_get_Visible(This,visible) \ virtual HRESULT STDMETHODCALLTYPE get_Time(
(This)->lpVtbl -> get_Visible(This,visible) int* seconds) = 0;
#define IVLCControl_put_Visible(This,visible) \ virtual HRESULT STDMETHODCALLTYPE put_Time(
(This)->lpVtbl -> put_Visible(This,visible) int seconds) = 0;
#define IVLCControl_play(This) \ virtual HRESULT STDMETHODCALLTYPE shuttle(
(This)->lpVtbl -> play(This) int seconds) = 0;
#define IVLCControl_pause(This) \ virtual HRESULT STDMETHODCALLTYPE fullscreen(
(This)->lpVtbl -> pause(This) ) = 0;
#define IVLCControl_stop(This) \ virtual HRESULT STDMETHODCALLTYPE get_Length(
(This)->lpVtbl -> stop(This) int* seconds) = 0;
#define IVLCControl_get_Playing(This,isPlaying) \ virtual HRESULT STDMETHODCALLTYPE playFaster(
(This)->lpVtbl -> get_Playing(This,isPlaying) ) = 0;
#define IVLCControl_get_Position(This,position) \ virtual HRESULT STDMETHODCALLTYPE playSlower(
(This)->lpVtbl -> get_Position(This,position) ) = 0;
#define IVLCControl_put_Position(This,position) \ virtual HRESULT STDMETHODCALLTYPE get_Volume(
(This)->lpVtbl -> put_Position(This,position) int* volume) = 0;
#define IVLCControl_get_Time(This,seconds) \ virtual HRESULT STDMETHODCALLTYPE put_Volume(
(This)->lpVtbl -> get_Time(This,seconds) int volume) = 0;
#define IVLCControl_put_Time(This,seconds) \ virtual HRESULT STDMETHODCALLTYPE toggleMute(
(This)->lpVtbl -> put_Time(This,seconds) ) = 0;
#define IVLCControl_shuttle(This,seconds) \ virtual HRESULT STDMETHODCALLTYPE setVariable(
(This)->lpVtbl -> shuttle(This,seconds) BSTR name,
VARIANT value) = 0;
#define IVLCControl_fullscreen(This) \ virtual HRESULT STDMETHODCALLTYPE getVariable(
(This)->lpVtbl -> fullscreen(This) BSTR name,
VARIANT* value) = 0;
#define IVLCControl_get_Length(This,seconds) \ virtual HRESULT STDMETHODCALLTYPE addTarget(
(This)->lpVtbl -> get_Length(This,seconds) BSTR uri,
VARIANT options,
enum VLCPlaylistMode mode,
int position) = 0;
#define IVLCControl_playFaster(This) \ virtual HRESULT STDMETHODCALLTYPE get_PlaylistIndex(
(This)->lpVtbl -> playFaster(This) int* index) = 0;
#define IVLCControl_playSlower(This) \ virtual HRESULT STDMETHODCALLTYPE get_PlaylistCount(
(This)->lpVtbl -> playSlower(This) int* index) = 0;
#define IVLCControl_get_Volume(This,volume) \ virtual HRESULT STDMETHODCALLTYPE playlistNext(
(This)->lpVtbl -> get_Volume(This,volume) ) = 0;
#define IVLCControl_put_Volume(This,volume) \ virtual HRESULT STDMETHODCALLTYPE playlistPrev(
(This)->lpVtbl -> put_Volume(This,volume) ) = 0;
#define IVLCControl_toggleMute(This) \ virtual HRESULT STDMETHODCALLTYPE playlistClear(
(This)->lpVtbl -> toggleMute(This) ) = 0;
#define IVLCControl_setVariable(This,name,value) \ virtual HRESULT STDMETHODCALLTYPE get_VersionInfo(
(This)->lpVtbl -> setVariable(This,name,value) BSTR* version) = 0;
#define IVLCControl_getVariable(This,name,value) \ virtual HRESULT STDMETHODCALLTYPE get_MRL(
(This)->lpVtbl -> getVariable(This,name,value) BSTR* mrl) = 0;
#define IVLCControl_addTarget(This,uri,options,mode,position) \ virtual HRESULT STDMETHODCALLTYPE put_MRL(
(This)->lpVtbl -> addTarget(This,uri,options,mode,position) BSTR mrl) = 0;
#define IVLCControl_get_PlaylistIndex(This,index) \ virtual HRESULT STDMETHODCALLTYPE get_AutoPlay(
(This)->lpVtbl -> get_PlaylistIndex(This,index) VARIANT_BOOL* autoplay) = 0;
#define IVLCControl_get_PlaylistCount(This,index) \ virtual HRESULT STDMETHODCALLTYPE put_AutoPlay(
(This)->lpVtbl -> get_PlaylistCount(This,index) VARIANT_BOOL autoplay) = 0;
#define IVLCControl_playlistNext(This) \ virtual HRESULT STDMETHODCALLTYPE get_AutoLoop(
(This)->lpVtbl -> playlistNext(This) VARIANT_BOOL* autoloop) = 0;
#define IVLCControl_playlistPrev(This) \ virtual HRESULT STDMETHODCALLTYPE put_AutoLoop(
(This)->lpVtbl -> playlistPrev(This) VARIANT_BOOL autoloop) = 0;
#define IVLCControl_playlistClear(This) \ };
(This)->lpVtbl -> playlistClear(This) #else
typedef struct IVLCControlVtbl {
#define IVLCControl_get_VersionInfo(This,version) \ BEGIN_INTERFACE
(This)->lpVtbl -> get_VersionInfo(This,version)
/*** IUnknown methods ***/
#define IVLCControl_get_MRL(This,mrl) \ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
(This)->lpVtbl -> get_MRL(This,mrl) 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) \ HRESULT (STDMETHODCALLTYPE *playlistPrev)(
(This)->lpVtbl -> put_MRL(This,mrl) IVLCControl* This);
#define IVLCControl_get_AutoPlay(This,autoplay) \ HRESULT (STDMETHODCALLTYPE *playlistClear)(
(This)->lpVtbl -> get_AutoPlay(This,autoplay) IVLCControl* This);
#define IVLCControl_put_AutoPlay(This,autoplay) \ HRESULT (STDMETHODCALLTYPE *get_VersionInfo)(
(This)->lpVtbl -> put_AutoPlay(This,autoplay) IVLCControl* This,
BSTR* version);
#define IVLCControl_get_AutoLoop(This,autoloop) \ HRESULT (STDMETHODCALLTYPE *get_MRL)(
(This)->lpVtbl -> get_AutoLoop(This,autoloop) IVLCControl* This,
BSTR* mrl);
#define IVLCControl_put_AutoLoop(This,autoloop) \ HRESULT (STDMETHODCALLTYPE *put_MRL)(
(This)->lpVtbl -> put_AutoLoop(This,autoloop) 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( #ifdef COBJMACROS
IVLCControl __RPC_FAR * This, /*** IUnknown methods ***/
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible); #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( void __RPC_STUB IVLCControl_get_Visible_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_put_Visible_Proxy(
IVLCControl* This,
/* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Visible_Proxy( VARIANT_BOOL visible);
IVLCControl __RPC_FAR * This,
/* [in] */ VARIANT_BOOL visible);
void __RPC_STUB IVLCControl_put_Visible_Stub( void __RPC_STUB IVLCControl_put_Visible_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_play_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_play_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_play_Stub( void __RPC_STUB IVLCControl_play_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_pause_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_pause_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_pause_Stub( void __RPC_STUB IVLCControl_pause_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_stop_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_stop_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_stop_Stub( void __RPC_STUB IVLCControl_stop_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_get_Playing_Proxy(
IVLCControl* This,
/* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy( VARIANT_BOOL* isPlaying);
IVLCControl __RPC_FAR * This,
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);
void __RPC_STUB IVLCControl_get_Playing_Stub( void __RPC_STUB IVLCControl_get_Playing_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_get_Position_Proxy(
IVLCControl* This,
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy( float* position);
IVLCControl __RPC_FAR * This,
/* [retval][out] */ float __RPC_FAR *position);
void __RPC_STUB IVLCControl_get_Position_Stub( void __RPC_STUB IVLCControl_get_Position_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_put_Position_Proxy(
IVLCControl* This,
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy( float position);
IVLCControl __RPC_FAR * This,
/* [in] */ float position);
void __RPC_STUB IVLCControl_put_Position_Stub( void __RPC_STUB IVLCControl_put_Position_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_get_Time_Proxy(
IVLCControl* This,
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Time_Proxy( int* seconds);
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *seconds);
void __RPC_STUB IVLCControl_get_Time_Stub( void __RPC_STUB IVLCControl_get_Time_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_put_Time_Proxy(
IVLCControl* This,
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Time_Proxy( int seconds);
IVLCControl __RPC_FAR * This,
/* [in] */ int seconds);
void __RPC_STUB IVLCControl_put_Time_Stub( void __RPC_STUB IVLCControl_put_Time_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_shuttle_Proxy(
IVLCControl* This,
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_shuttle_Proxy( int seconds);
IVLCControl __RPC_FAR * This,
/* [in] */ int seconds);
void __RPC_STUB IVLCControl_shuttle_Stub( void __RPC_STUB IVLCControl_shuttle_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_fullscreen_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_fullscreen_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_fullscreen_Stub( void __RPC_STUB IVLCControl_fullscreen_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_get_Length_Proxy(
IVLCControl* This,
/* [helpstring][hidden][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy( int* seconds);
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *seconds);
void __RPC_STUB IVLCControl_get_Length_Stub( void __RPC_STUB IVLCControl_get_Length_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_playFaster_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playFaster_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_playFaster_Stub( void __RPC_STUB IVLCControl_playFaster_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_playSlower_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_playSlower_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_playSlower_Stub( void __RPC_STUB IVLCControl_playSlower_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_get_Volume_Proxy(
IVLCControl* This,
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy( int* volume);
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *volume);
void __RPC_STUB IVLCControl_get_Volume_Stub( void __RPC_STUB IVLCControl_get_Volume_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_put_Volume_Proxy(
IVLCControl* This,
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy( int volume);
IVLCControl __RPC_FAR * This,
/* [in] */ int volume);
void __RPC_STUB IVLCControl_put_Volume_Stub( void __RPC_STUB IVLCControl_put_Volume_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_toggleMute_Proxy(
IVLCControl* This);
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_toggleMute_Proxy(
IVLCControl __RPC_FAR * This);
void __RPC_STUB IVLCControl_toggleMute_Stub( void __RPC_STUB IVLCControl_toggleMute_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_setVariable_Proxy(
IVLCControl* This,
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_setVariable_Proxy( BSTR name,
IVLCControl __RPC_FAR * This, VARIANT value);
/* [in] */ BSTR name,
/* [in] */ VARIANT value);
void __RPC_STUB IVLCControl_setVariable_Stub( void __RPC_STUB IVLCControl_setVariable_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_getVariable_Proxy(
IVLCControl* This,
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_getVariable_Proxy( BSTR name,
IVLCControl __RPC_FAR * This, VARIANT* value);
/* [in] */ BSTR name,
/* [retval][out] */ VARIANT __RPC_FAR *value);
void __RPC_STUB IVLCControl_getVariable_Stub( void __RPC_STUB IVLCControl_getVariable_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl_addTarget_Proxy(
IVLCControl* This,
/* [helpstring] */ HRESULT STDMETHODCALLTYPE IVLCControl_addTarget_Proxy( BSTR uri,
IVLCControl __RPC_FAR * This, VARIANT options,
/* [in] */ BSTR uri, enum VLCPlaylistMode mode,
/* [in] */ VARIANT options, int position);
/* [in] */ enum VLCPlaylistMode mode,
/* [in] */ int position);
void __RPC_STUB IVLCControl_addTarget_Stub( void __RPC_STUB IVLCControl_addTarget_Stub(
IRpcStubBuffer *This, IRpcStubBuffer* This,
IRpcChannelBuffer *_pRpcChannelBuffer, IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage, PRPC_MESSAGE pRpcMessage,
DWORD *_pdwStubPhase); 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( #endif /* __IVLCControl_INTERFACE_DEFINED__ */
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *index);
#define DISPID_PlayEvent (100)
void __RPC_STUB IVLCControl_get_PlaylistIndex_Stub( #define DISPID_PauseEvent (101)
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#define DISPID_StopEvent (102)
/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_PlaylistCount_Proxy( /*****************************************************************************
IVLCControl __RPC_FAR * This, * DVLCEvents dispinterface
/* [retval][out] */ int __RPC_FAR *index); */
#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( #ifdef COBJMACROS
IRpcStubBuffer *This, /*** IUnknown methods ***/
IRpcChannelBuffer *_pRpcChannelBuffer, #define DVLCEvents_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
PRPC_MESSAGE _pRpcMessage, #define DVLCEvents_AddRef(p) (p)->lpVtbl->AddRef(p)
DWORD *_pdwStubPhase); #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( #endif /* __DVLCEvents_DISPINTERFACE_DEFINED__ */
IVLCControl __RPC_FAR * This);
#ifndef __IVLCAudio_FWD_DEFINED__
#define __IVLCAudio_FWD_DEFINED__
typedef interface IVLCAudio IVLCAudio;
#endif
void __RPC_STUB IVLCControl_playlistNext_Stub( /*****************************************************************************
IRpcStubBuffer *This, * IVLCAudio interface
IRpcChannelBuffer *_pRpcChannelBuffer, */
PRPC_MESSAGE _pRpcMessage, #ifndef __IVLCAudio_INTERFACE_DEFINED__
DWORD *_pdwStubPhase); #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( virtual HRESULT STDMETHODCALLTYPE put_mute(
IVLCControl __RPC_FAR * This); VARIANT_BOOL muted) = 0;
virtual HRESULT STDMETHODCALLTYPE get_volume(
int* volume) = 0;
void __RPC_STUB IVLCControl_playlistPrev_Stub( virtual HRESULT STDMETHODCALLTYPE put_volume(
IRpcStubBuffer *This, int volume) = 0;
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
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( #ifdef COBJMACROS
IRpcStubBuffer *This, /*** IUnknown methods ***/
IRpcChannelBuffer *_pRpcChannelBuffer, #define IVLCAudio_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
PRPC_MESSAGE _pRpcMessage, #define IVLCAudio_AddRef(p) (p)->lpVtbl->AddRef(p)
DWORD *_pdwStubPhase); #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( HRESULT CALLBACK IVLCAudio_get_mute_Proxy(
IVLCControl __RPC_FAR * This, IVLCAudio* This,
/* [retval][out] */ BSTR __RPC_FAR *version); 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( DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
IRpcStubBuffer *This, #if defined(__cplusplus) && !defined(CINTERFACE)
IRpcChannelBuffer *_pRpcChannelBuffer, interface IVLCInput : public IDispatch
PRPC_MESSAGE _pRpcMessage, {
DWORD *_pdwStubPhase); 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( virtual HRESULT STDMETHODCALLTYPE put_position(
IVLCControl __RPC_FAR * This, float position) = 0;
/* [retval][out] */ BSTR __RPC_FAR *mrl);
virtual HRESULT STDMETHODCALLTYPE get_time(
__int64* time) = 0;
void __RPC_STUB IVLCControl_get_MRL_Stub( virtual HRESULT STDMETHODCALLTYPE put_time(
IRpcStubBuffer *This, __int64 time) = 0;
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
virtual HRESULT STDMETHODCALLTYPE get_state(
int* state) = 0;
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_MRL_Proxy( virtual HRESULT STDMETHODCALLTYPE get_rate(
IVLCControl __RPC_FAR * This, float* rate) = 0;
/* [in] */ BSTR mrl);
virtual HRESULT STDMETHODCALLTYPE put_rate(
float rate) = 0;
void __RPC_STUB IVLCControl_put_MRL_Stub( virtual HRESULT STDMETHODCALLTYPE get_fps(
IRpcStubBuffer *This, float* fps) = 0;
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
virtual HRESULT STDMETHODCALLTYPE get_hasVout(
VARIANT_BOOL* hasVout) = 0;
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoPlay_Proxy( };
IVLCControl __RPC_FAR * This, #else
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoplay); 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( #endif
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
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( DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
IVLCControl __RPC_FAR * This, #if defined(__cplusplus) && !defined(CINTERFACE)
/* [in] */ VARIANT_BOOL autoplay); 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( virtual HRESULT STDMETHODCALLTYPE add(
IRpcStubBuffer *This, BSTR uri,
IRpcChannelBuffer *_pRpcChannelBuffer, BSTR name,
PRPC_MESSAGE _pRpcMessage, VARIANT options,
DWORD *_pdwStubPhase); int* item) = 0;
virtual HRESULT STDMETHODCALLTYPE play(
) = 0;
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoLoop_Proxy( virtual HRESULT STDMETHODCALLTYPE playItem(
IVLCControl __RPC_FAR * This, int item) = 0;
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoloop);
virtual HRESULT STDMETHODCALLTYPE togglePause(
) = 0;
void __RPC_STUB IVLCControl_get_AutoLoop_Stub( virtual HRESULT STDMETHODCALLTYPE stop(
IRpcStubBuffer *This, ) = 0;
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
virtual HRESULT STDMETHODCALLTYPE next(
) = 0;
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_AutoLoop_Proxy( virtual HRESULT STDMETHODCALLTYPE prev(
IVLCControl __RPC_FAR * This, ) = 0;
/* [in] */ VARIANT_BOOL autoloop);
virtual HRESULT STDMETHODCALLTYPE clear(
) = 0;
void __RPC_STUB IVLCControl_put_AutoLoop_Stub( virtual HRESULT STDMETHODCALLTYPE removeItem(
IRpcStubBuffer *This, int item) = 0;
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
};
#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 */ DEFINE_GUID(IID_IVLCVideo, 0x0aaedf0b, 0xd333, 0x4b27, 0xa0,0xc6, 0xbb,0xf3,0x14,0x13,0xa4,0x2e);
/* [hidden][helpstring][uuid] */ #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
{ typedef struct IVLCVideoVtbl {
}; BEGIN_INTERFACE
#else /* C style interface */ /*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
typedef struct DVLCEventsVtbl IVLCVideo* This,
{ REFIID riid,
BEGIN_INTERFACE void** ppvObject);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( ULONG (STDMETHODCALLTYPE *AddRef)(
DVLCEvents __RPC_FAR * This, IVLCVideo* This);
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); ULONG (STDMETHODCALLTYPE *Release)(
IVLCVideo* This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
DVLCEvents __RPC_FAR * This); /*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( IVLCVideo* This,
DVLCEvents __RPC_FAR * This); UINT* pctinfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
DVLCEvents __RPC_FAR * This, IVLCVideo* This,
/* [out] */ UINT __RPC_FAR *pctinfo); UINT iTInfo,
LCID lcid,
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( ITypeInfo** ppTInfo);
DVLCEvents __RPC_FAR * This,
/* [in] */ UINT iTInfo, HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
/* [in] */ LCID lcid, IVLCVideo* This,
/* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); REFIID riid,
LPOLESTR* rgszNames,
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( UINT cNames,
DVLCEvents __RPC_FAR * This, LCID lcid,
/* [in] */ REFIID riid, DISPID* rgDispId);
/* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
/* [in] */ UINT cNames, HRESULT (STDMETHODCALLTYPE *Invoke)(
/* [in] */ LCID lcid, IVLCVideo* This,
/* [size_is][out] */ DISPID __RPC_FAR *rgDispId); DISPID dispIdMember,
REFIID riid,
/* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( LCID lcid,
DVLCEvents __RPC_FAR * This, WORD wFlags,
/* [in] */ DISPID dispIdMember, DISPPARAMS* pDispParams,
/* [in] */ REFIID riid, VARIANT* pVarResult,
/* [in] */ LCID lcid, EXCEPINFO* pExcepInfo,
/* [in] */ WORD wFlags, UINT* puArgErr);
/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
/* [out] */ VARIANT __RPC_FAR *pVarResult, /*** IVLCVideo methods ***/
/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, HRESULT (STDMETHODCALLTYPE *get_fullscreen)(
/* [out] */ UINT __RPC_FAR *puArgErr); IVLCVideo* This,
VARIANT_BOOL* fullscreen);
END_INTERFACE
} DVLCEventsVtbl; HRESULT (STDMETHODCALLTYPE *put_fullscreen)(
IVLCVideo* This,
interface DVLCEvents VARIANT_BOOL fullscreen);
{
CONST_VTBL struct DVLCEventsVtbl __RPC_FAR *lpVtbl; 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 #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) \ HRESULT CALLBACK IVLCVideo_get_fullscreen_Proxy(
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject) IVLCVideo* This,
VARIANT_BOOL* fullscreen);
#define DVLCEvents_AddRef(This) \ void __RPC_STUB IVLCVideo_get_fullscreen_Stub(
(This)->lpVtbl -> AddRef(This) 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) \ virtual HRESULT STDMETHODCALLTYPE get_input(
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) IVLCInput** obj) = 0;
#define DVLCEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ virtual HRESULT STDMETHODCALLTYPE get_playlist(
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) IVLCPlaylist** obj) = 0;
#define DVLCEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ virtual HRESULT STDMETHODCALLTYPE get_video(
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) 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") /* Begin additional prototypes for all interfaces */
VLCPlugin;
#endif
#endif /* __AXVLC_LIBRARY_DEFINED__ */
/* 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 #ifdef __cplusplus
} }
#endif #endif
#endif /* __WIDL_AXVLC_IDL_H */
#endif
/*****************************************************************************
* 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
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
*****************************************************************************/ *****************************************************************************/
#include "plugin.h" #include "plugin.h"
#include "utils.h"
#include <stdio.h>
#include <comcat.h> #include <comcat.h>
#include <windows.h> #include <windows.h>
...@@ -30,16 +33,12 @@ using namespace std; ...@@ -30,16 +33,12 @@ using namespace std;
#define COMPANY_STR "VideoLAN" #define COMPANY_STR "VideoLAN"
#define PROGRAM_STR "VLCPlugin" #define PROGRAM_STR "VLCPlugin"
#define VERSION_MAJOR_STR "1"
#define VERSION_MINOR_STR "0"
#define DESCRIPTION "VideoLAN VLC ActiveX Plugin" #define DESCRIPTION "VideoLAN VLC ActiveX Plugin"
#define THREADING_MODEL "Apartment" #define THREADING_MODEL "Apartment"
#define MISC_STATUS "131473" #define MISC_STATUS "131473"
#define PROGID_STR COMPANY_STR"."PROGRAM_STR #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 #define GUID_STRLEN 39
...@@ -58,9 +57,10 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -58,9 +57,10 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*ppv = NULL; *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); hr = plugin->QueryInterface(riid, ppv);
plugin->Release(); plugin->Release();
} }
...@@ -72,48 +72,67 @@ STDAPI DllCanUnloadNow(VOID) ...@@ -72,48 +72,67 @@ STDAPI DllCanUnloadNow(VOID)
return (0 == i_class_ref) ? S_OK: S_FALSE; return (0 == i_class_ref) ? S_OK: S_FALSE;
}; };
static LPCTSTR TStrFromGUID(REFGUID clsid) static inline HKEY keyCreate(HKEY parentKey, LPCSTR keyName)
{ {
LPOLESTR oleStr; HKEY childKey;
if( ERROR_SUCCESS == RegCreateKeyExA(parentKey, keyName, 0, NULL,
if( FAILED(StringFromIID(clsid, &oleStr)) ) REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &childKey, NULL) )
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 )
{ {
pct_CLSID = (char *)CoTaskMemAlloc(len); return childKey;
WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len, NULL, NULL);
} }
#else return NULL;
size_t len = MutiByteToWideChar(CP_ACP, 0, oleStr, -1, NULL, 0); };
if( len > 0 )
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)); RegSetValueExA(hKey, valueName, 0, REG_SZ,
MultiByteToWideChar(CP_ACP, 0, oleStr, -1, pct_CLSID, len); (const BYTE*)s, len);
} }
#endif return hKey;
CoTaskMemFree(oleStr);
return pct_CLSID;
}; };
static HKEY keyCreate(HKEY parentKey, LPCTSTR keyName) static inline HKEY keySetDef(HKEY hKey, const void *s, size_t len)
{ {
HKEY childKey; return keySet(hKey, NULL, s, len);
if( ERROR_SUCCESS == RegCreateKeyEx(parentKey, keyName, 0, NULL, };
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &childKey, NULL) )
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; 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) STDAPI DllUnregisterServer(VOID)
{ {
// unregister type lib from the registry // unregister type lib from the registry
...@@ -132,177 +151,193 @@ STDAPI DllUnregisterServer(VOID) ...@@ -132,177 +151,193 @@ STDAPI DllUnregisterServer(VOID)
pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin, pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin,
sizeof(implCategories)/sizeof(CATID), implCategories); sizeof(implCategories)/sizeof(CATID), implCategories);
pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin2,
sizeof(implCategories)/sizeof(CATID), implCategories);
pcr->Release(); pcr->Release();
} }
SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(VERS_PROGID_STR));
SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR)); SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
LPCTSTR psz_CLSID = TStrFromGUID(CLSID_VLCPlugin); UnregisterProgID(CLSID_VLCPlugin, 1);
UnregisterProgID(CLSID_VLCPlugin2, 1);
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);
return S_OK; return S_OK;
}; };
STDAPI DllRegisterServer(VOID) static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int version, const char *path, size_t pathLen)
{ {
DllUnregisterServer(); HKEY hClassKey;
{
char DllPath[MAX_PATH]; LPCSTR psz_CLSID = CStrFromGUID(rclsid);
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 hBaseKey; if( NULL == psz_CLSID )
return E_OUTOFMEMORY;
if( ERROR_SUCCESS != RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("CLSID"), 0, KEY_CREATE_SUB_KEY, &hBaseKey) ) hClassKey = keyCreate(hParent, psz_CLSID);
return SELFREG_E_CLASS; CoTaskMemFree((void *)psz_CLSID);
}
HKEY hClassKey = keyCreate(hBaseKey, psz_CLSID);
if( NULL != hClassKey ) if( NULL != hClassKey )
{ {
HKEY hSubKey;
// default key value // default key value
RegSetValueEx(hClassKey, NULL, 0, REG_SZ, keySetDef(hClassKey, DESCRIPTION, sizeof(DESCRIPTION));
(const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));
// Control key value // Control key value
hSubKey = keyCreate(hClassKey, TEXT("Control")); keyClose(keyCreate(hClassKey, "Control"));
RegCloseKey(hSubKey);
// Insertable key value // Insertable key value
//hSubKey = keyCreate(hClassKey, TEXT("Insertable")); //keyClose(keyCreate(hClassKey, "Insertable"));
//RegCloseKey(hSubKey);
// ToolboxBitmap32 key value // ToolboxBitmap32 key value
hSubKey = keyCreate(hClassKey, TEXT("ToolboxBitmap32")); {
strcpy(DllPath+DllPathLen, ",1"); char iconPath[pathLen+3];
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, memcpy(iconPath, path, pathLen);
(const BYTE*)DllPath, DllPathLen+2); strcpy(iconPath+pathLen, ",1");
DllPath[DllPathLen] = '\0'; keyClose(keySetDef(keyCreate(hClassKey,
RegCloseKey(hSubKey); "ToolboxBitmap32"),
iconPath, sizeof(iconPath)));
}
#ifdef BUILD_LOCALSERVER #ifdef BUILD_LOCALSERVER
// LocalServer32 key value // LocalServer32 key value
hSubKey = keyCreate(hClassKey, TEXT("LocalServer32")); keyClose(keySetDef(keyCreate(hClassKey,
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, "LocalServer32", path, pathLen+1)));
(const BYTE*)DllPath, DllPathLen);
RegCloseKey(hSubKey);
#else #else
// InprocServer32 key value // InprocServer32 key value
hSubKey = keyCreate(hClassKey, TEXT("InprocServer32")); {
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, HKEY hSubKey = keySetDef(keyCreate(hClassKey,
(const BYTE*)DllPath, DllPathLen); "InprocServer32"),
RegSetValueEx(hSubKey, TEXT("ThreadingModel"), 0, REG_SZ, path, pathLen+1);
(const BYTE*)THREADING_MODEL, sizeof(THREADING_MODEL)); keySet(hSubKey,
RegCloseKey(hSubKey); "ThreadingModel",
THREADING_MODEL, sizeof(THREADING_MODEL));
keyClose(hSubKey);
}
#endif #endif
// MiscStatus key value // MiscStatus key value
hSubKey = keyCreate(hClassKey, TEXT("MiscStatus\\1")); keyClose(keySetDef(keyCreate(hClassKey,
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, (const BYTE*)MISC_STATUS, sizeof(MISC_STATUS)); "MiscStatus\\1"),
RegCloseKey(hSubKey); MISC_STATUS, sizeof(MISC_STATUS)));
// Programmable key value // Programmable key value
hSubKey = keyCreate(hClassKey, TEXT("Programmable")); keyClose(keyCreate(hClassKey, "Programmable"));
RegCloseKey(hSubKey);
// ProgID key value // ProgID key value
hSubKey = keyCreate(hClassKey, TEXT("ProgID")); {
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, char progId[sizeof(PROGID_STR)+16];
(const BYTE*)VERS_PROGID_STR, sizeof(VERS_PROGID_STR)); sprintf(progId, "%s.%u", PROGID_STR, version);
RegCloseKey(hSubKey); keyClose(keySetDef(keyCreate(hClassKey,
TEXT("ProgID")),
progId));
}
// VersionIndependentProgID key value // VersionIndependentProgID key value
hSubKey = keyCreate(hClassKey, TEXT("VersionIndependentProgID")); keyClose(keySetDef(keyCreate(hClassKey,
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, "VersionIndependentProgID"),
(const BYTE*)PROGID_STR, sizeof(PROGID_STR)); PROGID_STR, sizeof(PROGID_STR)));
RegCloseKey(hSubKey);
// Version key value // Version key value
hSubKey = keyCreate(hClassKey, TEXT("Version")); {
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, char ver[32];
(const BYTE*)VERSION_STR, sizeof(VERSION_STR)); sprintf(ver, "%u.0", version);
RegCloseKey(hSubKey); keyClose(keySetDef(keyCreate(hClassKey,
"Version"),
ver));
}
// TypeLib key value // TypeLib key value
LPCTSTR psz_LIBID = TStrFromGUID(LIBID_AXVLC); LPCSTR psz_LIBID = CStrFromGUID(LIBID_AXVLC);
if( NULL != psz_LIBID ) if( NULL != psz_LIBID )
{ {
hSubKey = keyCreate(hClassKey, TEXT("TypeLib")); keyClose(keySetDef(keyCreate(hClassKey,
RegSetValueEx(hSubKey, NULL, 0, REG_SZ, "TypeLib"),
(const BYTE*)psz_LIBID, sizeof(TCHAR)*GUID_STRLEN); psz_LIBID, GUID_STRLEN));
RegCloseKey(hSubKey); CoTaskMemFree((void *)psz_LIBID);
} }
RegCloseKey(hClassKey); 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 ) if( NULL != hBaseKey )
{ {
// default key value // default key value
RegSetValueEx(hBaseKey, NULL, 0, REG_SZ, keySetDef(hBaseKey, DESCRIPTION, sizeof(DESCRIPTION));
(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));
RegCloseKey(hSubKey); keyClose(keySetDef(keyCreate(hBaseKey, "CLSID"),
} psz_CLSID,
GUID_STRLEN));
//hSubKey = keyClose(keyCreate(hBaseKey, "Insertable"));
RegCloseKey(hBaseKey); 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 ) if( NULL != hBaseKey )
{ {
// default key value // default key value
RegSetValueEx(hBaseKey, NULL, 0, REG_SZ, keySetDef(hBaseKey, DESCRIPTION, sizeof(DESCRIPTION));
(const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));
HKEY hSubKey = keyCreate(hBaseKey, TEXT("CLSID")); keyClose(keySetDef(keyCreate(hBaseKey, "CLSID"),
if( NULL != hSubKey ) psz_CLSID,
{ GUID_STRLEN));
// 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);
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 // indicate which component categories we support
ICatRegister *pcr; ICatRegister *pcr;
...@@ -317,6 +352,8 @@ STDAPI DllRegisterServer(VOID) ...@@ -317,6 +352,8 @@ STDAPI DllRegisterServer(VOID)
pcr->RegisterClassImplCategories(CLSID_VLCPlugin, pcr->RegisterClassImplCategories(CLSID_VLCPlugin,
sizeof(implCategories)/sizeof(CATID), implCategories); sizeof(implCategories)/sizeof(CATID), implCategories);
pcr->RegisterClassImplCategories(CLSID_VLCPlugin2,
sizeof(implCategories)/sizeof(CATID), implCategories);
pcr->Release(); pcr->Release();
} }
...@@ -347,8 +384,6 @@ STDAPI DllRegisterServer(VOID) ...@@ -347,8 +384,6 @@ STDAPI DllRegisterServer(VOID)
typeLib->Release(); typeLib->Release();
#endif #endif
CoTaskMemFree((void *)psz_CLSID);
return S_OK; return S_OK;
}; };
......
/***************************************************************************** /*****************************************************************************
* plugin.cpp: ActiveX control for VLC * 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> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
...@@ -100,9 +100,10 @@ static LRESULT CALLBACK VLCVideoClassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam ...@@ -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), _p_class_ref(p_class_ref),
_hinstance(hInstance), _hinstance(hInstance),
_classid(rclsid),
_inplace_picture(NULL) _inplace_picture(NULL)
{ {
WNDCLASS wClass; WNDCLASS wClass;
...@@ -248,9 +249,9 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) : ...@@ -248,9 +249,9 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
_videownd(NULL), _videownd(NULL),
_p_class(p_class), _p_class(p_class),
_i_ref(1UL), _i_ref(1UL),
_p_libvlc(NULL),
_i_codepage(CP_ACP), _i_codepage(CP_ACP),
_b_usermode(TRUE), _b_usermode(TRUE)
_i_vlc(0)
{ {
p_class->AddRef(); p_class->AddRef();
...@@ -339,6 +340,8 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv) ...@@ -339,6 +340,8 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
*ppv = reinterpret_cast<LPVOID>(vlcControl); *ppv = reinterpret_cast<LPVOID>(vlcControl);
else if( IID_IVLCControl == riid ) else if( IID_IVLCControl == riid )
*ppv = reinterpret_cast<LPVOID>(vlcControl); *ppv = reinterpret_cast<LPVOID>(vlcControl);
else if( IID_IVLCControl2 == riid )
*ppv = reinterpret_cast<LPVOID>(vlcControl2);
else if( IID_IViewObject == riid ) else if( IID_IViewObject == riid )
*ppv = reinterpret_cast<LPVOID>(vlcViewObject); *ppv = reinterpret_cast<LPVOID>(vlcViewObject);
else if( IID_IViewObject2 == riid ) else if( IID_IViewObject2 == riid )
...@@ -465,7 +468,7 @@ static void getViewportCoords(LPRECT lprPosRect, LPRECT lprClipRect) ...@@ -465,7 +468,7 @@ static void getViewportCoords(LPRECT lprPosRect, LPRECT lprClipRect)
HRESULT VLCPlugin::onInit(void) HRESULT VLCPlugin::onInit(void)
{ {
if( 0 == _i_vlc ) if( NULL == _p_libvlc )
{ {
// initialize persistable properties // initialize persistable properties
_bstr_mrl = NULL; _bstr_mrl = NULL;
...@@ -540,21 +543,29 @@ HRESULT VLCPlugin::onLoad(void) ...@@ -540,21 +543,29 @@ HRESULT VLCPlugin::onLoad(void)
return S_OK; return S_OK;
}; };
HRESULT VLCPlugin::getVLCObject(int *i_vlc) HRESULT VLCPlugin::getVLCObject(int* i_vlc)
{ {
if( ! isRunning() ) libvlc_instance_t *p_libvlc;
HRESULT result = getVLC(&p_libvlc);
if( SUCCEEDED(result) )
{ {
_i_vlc = VLC_Create(); *i_vlc = libvlc_get_vlc_id(p_libvlc);
if( _i_vlc < 0 ) }
{ else
_i_vlc = 0; {
return E_FAIL; *i_vlc = 0;
} }
return result;
}
HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
{
if( ! isRunning() )
{
/* /*
** default initialization options ** default initialization options
*/ */
char *ppsz_argv[10] = { "vlc", }; char *ppsz_argv[32] = { "vlc" };
int ppsz_argc = 1; int ppsz_argc = 1;
HKEY h_key; HKEY h_key;
...@@ -575,17 +586,38 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc) ...@@ -575,17 +586,38 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc)
RegCloseKey( h_key ); RegCloseKey( h_key );
} }
#if 0 #if 1
ppsz_argv[0] = "C:\\cygwin\\home\\Damien_Fouilleul\\dev\\videolan\\vlc-trunk\\vlc"; //ppsz_argv[0] = "C:\\cygwin\\home\\Damien_Fouilleul\\dev\\videolan\\vlc-trunk\\vlc";
ppsz_argv[0] = "C:\\cygwin\\home\\damienf\\vlc-trunk\\vlc";
#endif #endif
// make sure plugin isn't affected with VLC single instance mode // make sure plugin isn't affected with VLC single instance mode
ppsz_argv[ppsz_argc++] = "--no-one-instance"; 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 // loop mode is a configuration option only
if( _b_autoloop ) if( _b_autoloop )
ppsz_argv[ppsz_argc++] = "--loop"; 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() ) if( IsDebuggerPresent() )
{ {
/* /*
...@@ -600,36 +632,31 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc) ...@@ -600,36 +632,31 @@ HRESULT VLCPlugin::getVLCObject(int *i_vlc)
ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1"; 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); *pp_libvlc = NULL;
_i_vlc = 0;
return E_FAIL; return E_FAIL;
} }
VLC_VolumeSet(_i_vlc, _i_volume);
if( _b_mute )
VLC_VolumeMute(_i_vlc);
char *psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl); char *psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
if( NULL != psz_mrl ) if( NULL != psz_mrl )
{ {
char timeBuffer[32];
const char *options[1]; const char *options[1];
int cOptions = 0; int i_options = 0;
char timeBuffer[32];
if( _i_time ) if( _i_time )
{ {
snprintf(timeBuffer, sizeof(timeBuffer), ":start-time=%d", _i_time); snprintf(timeBuffer, sizeof(timeBuffer), ":start-time=%d", _i_time);
options[cOptions++] = timeBuffer; options[i_options++] = timeBuffer;
} }
// add default target to playlist // 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); CoTaskMemFree(psz_mrl);
} }
} }
*i_vlc = _i_vlc; *pp_libvlc = _p_libvlc;
return S_OK; return S_OK;
}; };
...@@ -721,13 +748,12 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption) ...@@ -721,13 +748,12 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
} }
if( isRunning() ) if( isRunning() )
{ {
int i_vlc = _i_vlc; libvlc_instance_t* p_libvlc = _p_libvlc;
_i_vlc = 0; _p_libvlc = NULL;
vlcDataObject->onClose(); vlcDataObject->onClose();
VLC_CleanUp(i_vlc); libvlc_destroy(p_libvlc);
VLC_Destroy(i_vlc);
} }
return S_OK; return S_OK;
}; };
...@@ -806,26 +832,24 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc ...@@ -806,26 +832,24 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
if( _b_usermode ) if( _b_usermode )
{ {
/* will run vlc if not done already */ /* will run vlc if not done already */
int i_vlc; libvlc_instance_t* p_libvlc;
HRESULT result = getVLCObject(&i_vlc); HRESULT result = getVLC(&p_libvlc);
if( FAILED(result) ) if( FAILED(result) )
return result; return result;
/* set internal video width and height */ /* set internal video width and height */
vlc_value_t val; libvlc_video_set_size(p_libvlc,
val.i_int = posRect.right-posRect.left; posRect.right-posRect.left,
VLC_VariableSet(i_vlc, "conf::width", val); posRect.bottom-posRect.top,
val.i_int = posRect.bottom-posRect.top; NULL );
VLC_VariableSet(i_vlc, "conf::height", val);
/* set internal video parent window */ /* set internal video parent window */
/* horrible cast there */ libvlc_video_set_parent(p_libvlc,
val.i_int = reinterpret_cast<int>(_videownd); reinterpret_cast<libvlc_drawable_t>(_videownd), NULL);
VLC_VariableSet(i_vlc, "drawable", val);
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(); fireOnPlayEvent();
} }
} }
...@@ -840,7 +864,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void) ...@@ -840,7 +864,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
{ {
if( isRunning() ) if( isRunning() )
{ {
VLC_Stop(_i_vlc); libvlc_playlist_stop(_p_libvlc, NULL);
fireOnStopEvent(); fireOnStopEvent();
} }
...@@ -880,7 +904,7 @@ void VLCPlugin::setVolume(int volume) ...@@ -880,7 +904,7 @@ void VLCPlugin::setVolume(int volume)
_i_volume = volume; _i_volume = volume;
if( isRunning() ) if( isRunning() )
{ {
VLC_VolumeSet(_i_vlc, _i_volume); libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL);
} }
setDirty(TRUE); setDirty(TRUE);
} }
...@@ -896,7 +920,12 @@ void VLCPlugin::setTime(int seconds) ...@@ -896,7 +920,12 @@ void VLCPlugin::setTime(int seconds)
_i_time = seconds; _i_time = seconds;
if( isRunning() ) 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); setDirty(TRUE);
} }
...@@ -1065,11 +1094,13 @@ void VLCPlugin::onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect) ...@@ -1065,11 +1094,13 @@ void VLCPlugin::onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
SWP_NOOWNERZORDER ); SWP_NOOWNERZORDER );
//RedrawWindow(_videownd, &posRect, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN); //RedrawWindow(_videownd, &posRect, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN);
vlc_value_t val; if( isRunning() )
val.i_int = posRect.right-posRect.left; {
VLC_VariableSet(_i_vlc, "conf::width", val); libvlc_video_set_size(_p_libvlc,
val.i_int = posRect.bottom-posRect.top; posRect.right-posRect.left,
VLC_VariableSet(_i_vlc, "conf::height", val); posRect.bottom-posRect.top,
NULL );
}
}; };
void VLCPlugin::freezeEvents(BOOL freeze) void VLCPlugin::freezeEvents(BOOL freeze)
......
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
#include <ole2.h> #include <ole2.h>
#include <olectl.h> #include <olectl.h>
#include <vlc/vlc.h> #include <vlc/libvlc.h>
extern const GUID CLSID_VLCPlugin; extern const GUID CLSID_VLCPlugin;
extern const GUID CLSID_VLCPlugin2;
extern const GUID LIBID_AXVLC; extern const GUID LIBID_AXVLC;
extern const GUID DIID_DVLCEvents; extern const GUID DIID_DVLCEvents;
...@@ -37,7 +38,7 @@ class VLCPluginClass : public IClassFactory ...@@ -37,7 +38,7 @@ class VLCPluginClass : public IClassFactory
public: public:
VLCPluginClass(LONG *p_class_ref,HINSTANCE hInstance); VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID rclsid);
/* IUnknown methods */ /* IUnknown methods */
STDMETHODIMP QueryInterface(REFIID riid, void **ppv); STDMETHODIMP QueryInterface(REFIID riid, void **ppv);
...@@ -48,6 +49,8 @@ public: ...@@ -48,6 +49,8 @@ public:
STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv); STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv);
STDMETHODIMP LockServer(BOOL fLock); STDMETHODIMP LockServer(BOOL fLock);
REFCLSID getClassID(void) { return (REFCLSID)_classid; };
LPCSTR getInPlaceWndClassName(void) const { return TEXT("VLC Plugin In-Place"); }; LPCSTR getInPlaceWndClassName(void) const { return TEXT("VLC Plugin In-Place"); };
LPCSTR getVideoWndClassName(void) const { return TEXT("VLC Plugin Video"); }; LPCSTR getVideoWndClassName(void) const { return TEXT("VLC Plugin Video"); };
HINSTANCE getHInstance(void) const { return _hinstance; }; HINSTANCE getHInstance(void) const { return _hinstance; };
...@@ -62,6 +65,7 @@ private: ...@@ -62,6 +65,7 @@ private:
LPLONG _p_class_ref; LPLONG _p_class_ref;
HINSTANCE _hinstance; HINSTANCE _hinstance;
CLSID _classid;
ATOM _inplace_wndclass_atom; ATOM _inplace_wndclass_atom;
ATOM _video_wndclass_atom; ATOM _video_wndclass_atom;
LPPICTURE _inplace_picture; LPPICTURE _inplace_picture;
...@@ -81,7 +85,7 @@ public: ...@@ -81,7 +85,7 @@ public:
/* custom methods */ /* custom methods */
HRESULT getTypeLib(LCID lcid, ITypeLib **pTL) { return LoadRegTypeLib(LIBID_AXVLC, 1, 0, lcid, pTL); }; 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; }; REFIID getDispEventID(void) { return (REFIID)DIID_DVLCEvents; };
/* /*
...@@ -165,9 +169,9 @@ public: ...@@ -165,9 +169,9 @@ public:
inline BOOL isDirty(void) { return _b_dirty; }; inline BOOL isDirty(void) { return _b_dirty; };
inline void setDirty(BOOL dirty) { _b_dirty = 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 getVLCObject(int *i_vlc);
HRESULT getVLC(libvlc_instance_t** p_vlc);
// control geometry within container // control geometry within container
RECT getPosRect(void) { return _posRect; }; RECT getPosRect(void) { return _posRect; };
...@@ -218,6 +222,7 @@ private: ...@@ -218,6 +222,7 @@ private:
class VLCConnectionPointContainer *vlcConnectionPointContainer; class VLCConnectionPointContainer *vlcConnectionPointContainer;
class VLCObjectSafety *vlcObjectSafety; class VLCObjectSafety *vlcObjectSafety;
class VLCControl *vlcControl; class VLCControl *vlcControl;
class VLCControl2 *vlcControl2;
class VLCViewObject *vlcViewObject; class VLCViewObject *vlcViewObject;
class VLCDataObject *vlcDataObject; class VLCDataObject *vlcDataObject;
...@@ -226,12 +231,12 @@ private: ...@@ -226,12 +231,12 @@ private:
// video window (Drawing window) // video window (Drawing window)
HWND _videownd; HWND _videownd;
VLCPluginClass *_p_class; VLCPluginClass* _p_class;
ULONG _i_ref; ULONG _i_ref;
libvlc_instance_t* _p_libvlc;
UINT _i_codepage; UINT _i_codepage;
BOOL _b_usermode; BOOL _b_usermode;
int _i_vlc;
RECT _posRect; RECT _posRect;
// persistable properties // persistable properties
......
...@@ -70,6 +70,28 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s) ...@@ -70,6 +70,28 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s)
return NULL; 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 ** properties
*/ */
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
extern char *CStrFromBSTR(UINT codePage, BSTR bstr); extern char *CStrFromBSTR(UINT codePage, BSTR bstr);
extern BSTR BSTRFromCStr(UINT codePage, LPCSTR s); extern BSTR BSTRFromCStr(UINT codePage, LPCSTR s);
extern char *CStrFromGUID(REFGUID clsid);
// properties // properties
extern HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v); extern HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v);
......
...@@ -529,7 +529,7 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value) ...@@ -529,7 +529,7 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value)
return hr; return hr;
}; };
static void freeTargetOptions(char **cOptions, int cOptionCount) void VLCControl::FreeTargetOptions(char **cOptions, int cOptionCount)
{ {
// clean up // clean up
if( NULL != cOptions ) if( NULL != cOptions )
...@@ -546,7 +546,7 @@ static void freeTargetOptions(char **cOptions, int cOptionCount) ...@@ -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; HRESULT hr = E_INVALIDARG;
if( VT_ERROR == V_VT(options) ) if( VT_ERROR == V_VT(options) )
...@@ -621,7 +621,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti ...@@ -621,7 +621,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
if( FAILED(hr) ) if( FAILED(hr) )
{ {
// free already processed elements // free already processed elements
freeTargetOptions(*cOptions, *cOptionCount); FreeTargetOptions(*cOptions, *cOptionCount);
} }
} }
else else
...@@ -715,7 +715,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti ...@@ -715,7 +715,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
if( FAILED(hr) ) if( FAILED(hr) )
{ {
// free already processed elements // free already processed elements
freeTargetOptions(*cOptions, *cOptionCount); FreeTargetOptions(*cOptions, *cOptionCount);
} }
} }
else else
...@@ -750,7 +750,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM ...@@ -750,7 +750,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
int cOptionsCount; int cOptionsCount;
char **cOptions; char **cOptions;
if( FAILED(createTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) ) if( FAILED(CreateTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) )
return E_INVALIDARG; return E_INVALIDARG;
if( VLC_SUCCESS <= VLC_AddTarget(i_vlc, cUri, (const char **)cOptions, cOptionsCount, mode, position) ) 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 ...@@ -766,7 +766,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
_p_instance->fireOnStopEvent(); _p_instance->fireOnStopEvent();
} }
freeTargetOptions(cOptions, cOptionsCount); FreeTargetOptions(cOptions, cOptionsCount);
CoTaskMemFree(cUri); CoTaskMemFree(cUri);
} }
return hr; return hr;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#ifndef _VLCCONTROL_H_ #ifndef _VLCCONTROL_H_
#define _VLCCONTROL_H_ #define _VLCCONTROL_H_
#include <oaidl.h>
#include "axvlc_idl.h" #include "axvlc_idl.h"
class VLCControl : public IVLCControl class VLCControl : public IVLCControl
...@@ -94,6 +93,9 @@ public: ...@@ -94,6 +93,9 @@ public:
STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay); STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay);
STDMETHODIMP put_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: private:
HRESULT getTypeInfo(); HRESULT getTypeInfo();
......
/*****************************************************************************
* 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;
};
/*****************************************************************************
* 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment