Commit d3ad3bb1 authored by Damien Fouilleul's avatar Damien Fouilleul

all: reworked ActiveX plugin, which now works properly with .NET (tested with...

all: reworked ActiveX plugin, which now works properly  with .NET (tested with Visual Basic Express 2005)
     added persistent properties such as MRL, AutoPlay, AutoLoop which allows a user to play a default target
     without programming.
parent 2fd7b91d
......@@ -33,11 +33,14 @@ library AXVLC
interface IVLCControl;
dispinterface DVLCEvents;
enum VLCPlaylistMode {
enum VLCPlaylistMode
{
VLCPlayListInsert = 1,
VLCPlayListInsertAndGo = 9,
VLCPlayListReplace = 2,
VLCPlayListReplaceAndGo = 10,
VLCPlayListAppend = 4,
VLCPlayListGo = 8,
VLCPlayListAppendAndGo = 12,
VLCPlayListCheckInsert = 16
};
......@@ -45,16 +48,15 @@ library AXVLC
const int VLCPlayListEnd = -666;
// DISPID definitions
const int DISPID_Visible = 1;
const int DISPID_Playing = 2;
const int DISPID_Position = 3;
const int DISPID_Time = 4;
const int DISPID_Length = 5;
const int DISPID_Volume = 6;
const int DISPID_PlayEvent = 1;
const int DISPID_PauseEvent = 2;
const int DISPID_StopEvent = 3;
const int DISPID_Visible = 100;
const int DISPID_Playing = 101;
const int DISPID_Position = 102;
const int DISPID_Time = 103;
const int DISPID_Length = 104;
const int DISPID_Volume = 105;
const int DISPID_MRL = 106;
const int DISPID_AutoPlay = 107;
const int DISPID_AutoLoop = 108;
[
odl,
......@@ -64,8 +66,8 @@ library AXVLC
hidden,
oleautomation
]
interface IVLCControl : IDispatch {
interface IVLCControl : IDispatch
{
[id(DISPID_Visible), propget, bindable, helpstring("Shows or hides plugin.")]
HRESULT Visible([out, retval] VARIANT_BOOL* visible);
[id(DISPID_Visible), propput, bindable, helpstring("Shows or hides plugin.")]
......@@ -76,13 +78,11 @@ library AXVLC
HRESULT pause();
[helpstring("Stop playback.")]
HRESULT stop();
[id(DISPID_Playing), bindable, propget, helpstring("Specifies whether VLC is playing.")]
[id(DISPID_Playing), hidden, propget, helpstring("Returns whether VLC is playing.")]
HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
[id(DISPID_Playing), bindable, propput, helpstring("Specifies whether VLC is playing.")]
HRESULT Playing([in] VARIANT_BOOL isPlaying);
[id(DISPID_Position), bindable, propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
[id(DISPID_Position), propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
HRESULT Position([out, retval] float* position);
[id(DISPID_Position), bindable, propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
[id(DISPID_Position), propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
HRESULT Position([in] float position);
[id(DISPID_Time), propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]
HRESULT Time([out, retval] int* seconds);
......@@ -92,15 +92,15 @@ library AXVLC
HRESULT shuttle([in] int seconds);
[helpstring("Switch between normal and fullscreen video.")]
HRESULT fullscreen();
[id(DISPID_Length), bindable, propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]
[id(DISPID_Length), propget, hidden, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]
HRESULT Length([out, retval] int* seconds);
[helpstring("Increases playback speed, one of 1x, 2x, 4x, 8x.")]
HRESULT playFaster();
[helpstring("Decreases playback speed, one of 1x, 2x, 4x, 8x.")]
HRESULT playSlower();
[id(DISPID_Volume), bindable, propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
[id(DISPID_Volume), propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
HRESULT Volume([out, retval] int* volume);
[id(DISPID_Volume), bindable, propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
[id(DISPID_Volume), propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
HRESULT Volume([in] int volume);
[helpstring("Mute/unmute playback sound volume.")]
HRESULT toggleMute();
......@@ -126,24 +126,41 @@ library AXVLC
HRESULT playlistPrev();
[helpstring("Remove all items from playlist.")]
HRESULT playlistClear();
[propget, helpstring("Returns VLC Version.")]
[propget, hidden, helpstring("Returns VLC Version.")]
HRESULT VersionInfo([out, retval] BSTR* version);
[id(DISPID_MRL), propget, helpstring("Returns initial MRL in default playlist")]
HRESULT MRL([out, retval] BSTR* mrl);
[id(DISPID_MRL), propput, helpstring("Specifies initial MRL in default playlist")]
HRESULT MRL([in] BSTR mrl);
[id(DISPID_AutoPlay), propget, helpstring("Specifies whether default playlist is played on startup")]
HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
[id(DISPID_AutoPlay), propput, helpstring("Returns whether default playlist is played on startup")]
HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
[id(DISPID_AutoLoop), propget, helpstring("Specifies whether default playlist is looped")]
HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
[id(DISPID_AutoLoop), propput, helpstring("Returns whether default playlist is looped")]
HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
};
const int DISPID_PlayEvent = 100;
const int DISPID_PauseEvent = 101;
const int DISPID_StopEvent = 102;
[
uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
helpstring("Event interface for VLC control"),
hidden
]
dispinterface DVLCEvents {
dispinterface DVLCEvents
{
properties:
methods:
[id(DISPID_PlayEvent), helpstring("Playback in progress")]
void Play();
void play();
[id(DISPID_PauseEvent), helpstring("Playback has paused")]
void Pause();
void pause();
[id(DISPID_StopEvent), helpstring("Playback has stopped")]
void Stop();
void stop();
};
[
......@@ -151,7 +168,8 @@ library AXVLC
helpstring("VLC control"),
control
]
coclass VLCPlugin {
coclass VLCPlugin
{
[default] interface IVLCControl;
[default, source] dispinterface DVLCEvents;
};
......
No preview for this file type
......@@ -5,7 +5,7 @@
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue May 10 21:24:51 2005
/* at Sun Aug 21 17:16:22 2005
*/
/* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
......
......@@ -2,7 +2,7 @@
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue May 10 21:24:51 2005
/* at Sun Aug 21 17:16:22 2005
*/
/* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
......@@ -67,30 +67,38 @@ void __RPC_USER MIDL_user_free( void __RPC_FAR * );
enum VLCPlaylistMode
{ VLCPlayListInsert = 1,
VLCPlayListInsertAndGo = 9,
VLCPlayListReplace = 2,
VLCPlayListReplaceAndGo = 10,
VLCPlayListAppend = 4,
VLCPlayListGo = 8,
VLCPlayListAppendAndGo = 12,
VLCPlayListCheckInsert = 16
};
#define VLCPlayListEnd ( -666 )
#define DISPID_Visible ( 1 )
#define DISPID_Visible ( 100 )
#define DISPID_Playing ( 2 )
#define DISPID_Playing ( 101 )
#define DISPID_Position ( 3 )
#define DISPID_Position ( 102 )
#define DISPID_Time ( 4 )
#define DISPID_Time ( 103 )
#define DISPID_Length ( 5 )
#define DISPID_Length ( 104 )
#define DISPID_Volume ( 6 )
#define DISPID_Volume ( 105 )
#define DISPID_PlayEvent ( 1 )
#define DISPID_MRL ( 106 )
#define DISPID_PauseEvent ( 2 )
#define DISPID_AutoPlay ( 107 )
#define DISPID_StopEvent ( 3 )
#define DISPID_AutoLoop ( 108 )
#define DISPID_PlayEvent ( 100 )
#define DISPID_PauseEvent ( 101 )
#define DISPID_StopEvent ( 102 )
EXTERN_C const IID LIBID_AXVLC;
......@@ -122,16 +130,13 @@ EXTERN_C const IID IID_IVLCControl;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE stop( void) = 0;
virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Playing(
virtual /* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE get_Playing(
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying) = 0;
virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Playing(
/* [in] */ VARIANT_BOOL isPlaying) = 0;
virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Position(
virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Position(
/* [retval][out] */ float __RPC_FAR *position) = 0;
virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Position(
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Position(
/* [in] */ float position) = 0;
virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Time(
......@@ -145,17 +150,17 @@ EXTERN_C const IID IID_IVLCControl;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE fullscreen( void) = 0;
virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Length(
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][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Volume(
virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Volume(
/* [retval][out] */ int __RPC_FAR *volume) = 0;
virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Volume(
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Volume(
/* [in] */ int volume) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleMute( void) = 0;
......@@ -186,9 +191,27 @@ EXTERN_C const IID IID_IVLCControl;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistClear( void) = 0;
virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_VersionInfo(
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 */
......@@ -254,19 +277,15 @@ EXTERN_C const IID IID_IVLCControl;
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *stop )(
IVLCControl __RPC_FAR * This);
/* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Playing )(
/* [helpstring][propget][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Playing )(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);
/* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Playing )(
IVLCControl __RPC_FAR * This,
/* [in] */ VARIANT_BOOL isPlaying);
/* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Position )(
/* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Position )(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ float __RPC_FAR *position);
/* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Position )(
/* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Position )(
IVLCControl __RPC_FAR * This,
/* [in] */ float position);
......@@ -285,7 +304,7 @@ EXTERN_C const IID IID_IVLCControl;
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *fullscreen )(
IVLCControl __RPC_FAR * This);
/* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Length )(
/* [helpstring][hidden][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Length )(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *seconds);
......@@ -295,11 +314,11 @@ EXTERN_C const IID IID_IVLCControl;
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playSlower )(
IVLCControl __RPC_FAR * This);
/* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Volume )(
/* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Volume )(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *volume);
/* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Volume )(
/* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Volume )(
IVLCControl __RPC_FAR * This,
/* [in] */ int volume);
......@@ -340,10 +359,34 @@ EXTERN_C const IID IID_IVLCControl;
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playlistClear )(
IVLCControl __RPC_FAR * This);
/* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_VersionInfo )(
/* [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;
......@@ -398,9 +441,6 @@ EXTERN_C const IID IID_IVLCControl;
#define IVLCControl_get_Playing(This,isPlaying) \
(This)->lpVtbl -> get_Playing(This,isPlaying)
#define IVLCControl_put_Playing(This,isPlaying) \
(This)->lpVtbl -> put_Playing(This,isPlaying)
#define IVLCControl_get_Position(This,position) \
(This)->lpVtbl -> get_Position(This,position)
......@@ -464,6 +504,24 @@ EXTERN_C const IID IID_IVLCControl;
#define IVLCControl_get_VersionInfo(This,version) \
(This)->lpVtbl -> get_VersionInfo(This,version)
#define IVLCControl_get_MRL(This,mrl) \
(This)->lpVtbl -> get_MRL(This,mrl)
#define IVLCControl_put_MRL(This,mrl) \
(This)->lpVtbl -> put_MRL(This,mrl)
#define IVLCControl_get_AutoPlay(This,autoplay) \
(This)->lpVtbl -> get_AutoPlay(This,autoplay)
#define IVLCControl_put_AutoPlay(This,autoplay) \
(This)->lpVtbl -> put_AutoPlay(This,autoplay)
#define IVLCControl_get_AutoLoop(This,autoloop) \
(This)->lpVtbl -> get_AutoLoop(This,autoloop)
#define IVLCControl_put_AutoLoop(This,autoloop) \
(This)->lpVtbl -> put_AutoLoop(This,autoloop)
#endif /* COBJMACROS */
......@@ -528,7 +586,7 @@ void __RPC_STUB IVLCControl_stop_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy(
/* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);
......@@ -540,19 +598,7 @@ void __RPC_STUB IVLCControl_get_Playing_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Playing_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ VARIANT_BOOL isPlaying);
void __RPC_STUB IVLCControl_put_Playing_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy(
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ float __RPC_FAR *position);
......@@ -564,7 +610,7 @@ void __RPC_STUB IVLCControl_get_Position_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy(
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ float position);
......@@ -623,7 +669,7 @@ void __RPC_STUB IVLCControl_fullscreen_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy(
/* [helpstring][hidden][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *seconds);
......@@ -657,7 +703,7 @@ void __RPC_STUB IVLCControl_playSlower_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy(
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ int __RPC_FAR *volume);
......@@ -669,7 +715,7 @@ void __RPC_STUB IVLCControl_get_Volume_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy(
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ int volume);
......@@ -790,7 +836,7 @@ void __RPC_STUB IVLCControl_playlistClear_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_VersionInfo_Proxy(
/* [helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_VersionInfo_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *version);
......@@ -802,6 +848,78 @@ void __RPC_STUB IVLCControl_get_VersionInfo_Stub(
DWORD *_pdwStubPhase);
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_MRL_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ BSTR __RPC_FAR *mrl);
void __RPC_STUB IVLCControl_get_MRL_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_MRL_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ BSTR mrl);
void __RPC_STUB IVLCControl_put_MRL_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoPlay_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoplay);
void __RPC_STUB IVLCControl_get_AutoPlay_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_AutoPlay_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ VARIANT_BOOL autoplay);
void __RPC_STUB IVLCControl_put_AutoPlay_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_AutoLoop_Proxy(
IVLCControl __RPC_FAR * This,
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *autoloop);
void __RPC_STUB IVLCControl_get_AutoLoop_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_AutoLoop_Proxy(
IVLCControl __RPC_FAR * This,
/* [in] */ VARIANT_BOOL autoloop);
void __RPC_STUB IVLCControl_put_AutoLoop_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IVLCControl_INTERFACE_DEFINED__ */
......
......@@ -192,18 +192,16 @@ HRESULT VLCDataObject::getMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedi
SIZEL size = _p_instance->getExtent();
RECTL wBounds = { 0L, 0L, size.cx, size.cy };
LONG width = size.cx*GetDeviceCaps(hicTargetDev, LOGPIXELSX)/2540L;
LONG height = size.cy*GetDeviceCaps(hicTargetDev, LOGPIXELSY)/2540L;
pMetaFilePict->mm = MM_ANISOTROPIC;
pMetaFilePict->xExt = size.cx;
pMetaFilePict->yExt = size.cy;
DPFromHimetric(hicTargetDev, (LPPOINT)&size, 1);
SetMapMode(hdcMeta, MM_ANISOTROPIC);
SetWindowOrgEx(hdcMeta, 0, 0, NULL);
SetWindowExtEx(hdcMeta, width, height, NULL);
SetWindowExtEx(hdcMeta, size.cx, size.cy, NULL);
RECTL bounds = { 0L, 0L, width, height };
RECTL bounds = { 0L, 0L, size.cx, size.cy };
_p_instance->onDraw(pFormatEtc->ptd, hicTargetDev, hdcMeta, &bounds, &wBounds);
pMetaFilePict->hMF = CloseMetaFile(hdcMeta);
......@@ -230,10 +228,9 @@ HRESULT VLCDataObject::getEnhMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pM
{
RECTL wBounds = { 0L, 0L, size.cx, size.cy };
LONG width = size.cx*GetDeviceCaps(hicTargetDev, LOGPIXELSX)/2540L;
LONG height = size.cy*GetDeviceCaps(hicTargetDev, LOGPIXELSY)/2540L;
DPFromHimetric(hicTargetDev, (LPPOINT)&size, 1);
RECTL bounds = { 0L, 0L, width, height };
RECTL bounds = { 0L, 0L, size.cx, size.cy };
_p_instance->onDraw(pFormatEtc->ptd, hicTargetDev, hdcMeta, &bounds, &wBounds);
pMedium->hEnhMetaFile = CloseEnhMetaFile(hdcMeta);
......@@ -279,6 +276,11 @@ STDMETHODIMP VLCDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium,
return E_NOTIMPL;
};
/*void VLCDataObject::onDataChange(void)
{
_p_adviseHolder->SendOnDataChange(this, 0, 0);
};*/
void VLCDataObject::onClose(void)
{
_p_adviseHolder->SendOnDataChange(this, 0, ADVF_DATAONSTOP);
......
......@@ -96,7 +96,7 @@ static LPCTSTR TStrFromGUID(REFGUID clsid)
if( len > 0 )
{
clsidStr = (wchar_t *)CoTaskMemAlloc(len*sizeof(wchar_t));
WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len);
MultiByteToWideChar(CP_ACP, 0, oleStr, -1, pct_CLSID, len);
}
#endif
CoTaskMemFree(oleStr);
......
......@@ -23,8 +23,6 @@
#include "plugin.h"
#include "olecontrol.h"
#include "utils.h"
using namespace std;
STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI)
......@@ -45,12 +43,12 @@ STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg)
return E_NOTIMPL;
};
static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v)
STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
{
HRESULT hr;
IOleObject *oleObj;
hr = instance.QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
hr = QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
if( SUCCEEDED(hr) )
{
IOleClientSite *clientSite;
......@@ -58,70 +56,11 @@ static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v
hr = oleObj->GetClientSite(&clientSite);
if( SUCCEEDED(hr) && (NULL != clientSite) )
{
hr = GetObjectProperty(clientSite, dispID, v);
_p_instance->onAmbientChanged(clientSite, dispID);
clientSite->Release();
}
oleObj->Release();
}
return hr;
};
STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
{
switch( dispID )
{
case DISPID_AMBIENT_BACKCOLOR:
break;
case DISPID_AMBIENT_DISPLAYNAME:
break;
case DISPID_AMBIENT_FONT:
break;
case DISPID_AMBIENT_FORECOLOR:
break;
case DISPID_AMBIENT_LOCALEID:
break;
case DISPID_AMBIENT_MESSAGEREFLECT:
break;
case DISPID_AMBIENT_SCALEUNITS:
break;
case DISPID_AMBIENT_TEXTALIGN:
break;
case DISPID_AMBIENT_USERMODE:
break;
case DISPID_AMBIENT_UIDEAD:
break;
case DISPID_AMBIENT_SHOWGRABHANDLES:
break;
case DISPID_AMBIENT_SHOWHATCHING:
break;
case DISPID_AMBIENT_DISPLAYASDEFAULT:
break;
case DISPID_AMBIENT_SUPPORTSMNEMONICS:
break;
case DISPID_AMBIENT_AUTOCLIP:
break;
case DISPID_AMBIENT_APPEARANCE:
break;
case DISPID_AMBIENT_CODEPAGE:
VARIANT v;
VariantInit(&v);
V_VT(&v) = VT_I4;
if( SUCCEEDED(getAmbientProperty(*_p_instance, dispID, v)) )
{
_p_instance->setCodePage(V_I4(&v));
}
break;
case DISPID_AMBIENT_PALETTE:
break;
case DISPID_AMBIENT_CHARSET:
break;
case DISPID_AMBIENT_RIGHTTOLEFT:
break;
case DISPID_AMBIENT_TOPTOBOTTOM:
break;
default:
break;
}
return S_OK;
};
......
......@@ -28,18 +28,15 @@ using namespace std;
STDMETHODIMP VLCOleInPlaceActiveObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
return E_POINTER;
*pHwnd = NULL;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
return E_FAIL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::EnableModeless(BOOL fEnable)
......
......@@ -30,18 +30,15 @@ using namespace std;
STDMETHODIMP VLCOleInPlaceObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
return E_POINTER;
*pHwnd = NULL;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
return E_FAIL;