plugin.h \
axvlc_idl.c \
axvlc_idl.h \
- $(NULL)
+ $(NULL)
DIST_rsrc = \
- axvlc_rc.rc \
- $(NULL)
+ axvlc_rc.rc \
+ $(NULL)
DIST_misc = \
- README.TXT \
- axvlc.def \
- axvlc.idl \
- axvlc.reg \
- axvlc.tlb \
- inplace.bmp \
- test.html \
- $(NULL)
+ README.TXT \
+ axvlc.def \
+ axvlc.idl \
+ axvlc.reg \
+ axvlc.tlb \
+ inplace.bmp \
+ test.html \
+ $(NULL)
LIBRARIES_libvlc = $(top_builddir)/lib/libvlc.a
DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
noinst_axvlc_rcdir = $(libdir)
-axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp $(axvlc_tlb_DATA)
+axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb
$(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@
else
The VLC ActiveX Control has been primary designed to work with Internet Explorer.
however it may also work with Visual Basic and/or .NET
Please note, that this code does not rely upon MFC/ATL, hence good compatibility
-is not guaranteed
+is not guaranteed.
== Compiling ==
-In order to script the ActiveX Control on Internet Explorer, a type library is required.
+The Active Control should compile without any glitches as long as you have the latest
+version of mingw gcc and headers. However, In order to script the ActiveX Control
+on Internet Explorer, a type library is required.
+
This type library is usually generated from an IDL file using Microsoft MIDL compiler.
-However, for convenience I have checked in the output of the MIDL compiler in the
+Therefore, for convenience I have checked in the output of the MIDL compiler in the
repository so that you will only need the MIDL compiler if you change axvlc.idl.
the generated files are as follow:
if you are cross-compiling on Linux, you may be able to use 'widl' which is part of
the WINE project (http://www.winehq.com), however I have not tested it.
-== Installing ==
+== Local Install ==
-The ActiveX control is built as axvlc.dll, which is the only file that needs be
+The ActiveX control is built as a DLL file, which is the only file that needs be
distributed and it may be installed anywhere on the target machine as long as
-its path is correct within the registry.
-the necessary registry settings are stored in axvlc.reg
+its path is specified within your PATH environment variable. Typically, you would
+install it into your WINDOWS directory.
-in order to use the plugin, you will need to VLC properly installed on your system
-otherwise make sure that the plugin path is set in the registry as indicated below
+if the control needs other VLC plugins, you will need to have VLC installed
+on your system, otherwise make sure that the plugin path is set in the registry
+as indicated below
[HKEY_LOCAL_MACHINE\Software\VideoLAN\VLC]
InstallDir="path\\dir\\"
+WARNING: The plugins version must also match the ActiveX control version,
+otherwise it may crash while attempting to load incompatible plugins
+
+== Internet Install ==
+
+The activex control may be installed from a remote through Internet Installer if
+it is packaged up in a CAB file. The following link explains how to achieve this
+
+http://msdn.microsoft.com/workshop/components/activex/packaging.asp
+
+For convenience, I have provide a sample axvlc.INF file, which installs the ActiveX Control
+into the WINDOWS directory, feel free to adapt it to your need.
+
+WARNING: For remote install, the ActiveX Control should be built with all required VLC
+plugins built-in.
+
regards,
Damien Fouilleul <Damien dot Fouilleul at laposte dot net>
+
dispinterface DVLCEvents;\r
\r
enum VLCPlaylistMode {\r
- VLCPlayListInsert = 1,\r
- VLCPlayListReplace = 2,\r
- VLCPlayListAppend = 4,\r
- VLCPlayListGo = 8,\r
- VLCPlayListCheckInsert = 16\r
+ VLCPlayListInsert = 1,\r
+ VLCPlayListReplace = 2,\r
+ VLCPlayListAppend = 4,\r
+ VLCPlayListGo = 8,\r
+ VLCPlayListCheckInsert = 16\r
};\r
\r
// playlist target position\r
- const int VLCPlayListEnd = -666;\r
+ const int VLCPlayListEnd = -666;\r
+\r
+ // DISPID definitions\r
+ const int DISPID_Visible = 1;\r
+ const int DISPID_Playing = 2;\r
+ const int DISPID_Position = 3;\r
+ const int DISPID_Time = 4;\r
+ const int DISPID_Length = 5;\r
+ const int DISPID_Volume = 6;\r
+\r
+ const int DISPID_PlayEvent = 1;\r
+ const int DISPID_PauseEvent = 2;\r
+ const int DISPID_StopEvent = 3;\r
\r
[\r
odl,\r
oleautomation\r
]\r
interface IVLCControl : IDispatch {\r
+\r
[id(0), bindable, defaultbind, propget, helpstring("Specifies current target in playlist")]\r
HRESULT Value([out, retval] VARIANT* pvarValue);\r
[id(0), bindable, defaultbind, propput, helpstring("Specifies current target in playlist")]\r
HRESULT Value([in] VARIANT pvarValue);\r
- [propget, bindable, helpstring("Shows or hides plugin.")]\r
+ [id(DISPID_Visible), propget, bindable, helpstring("Shows or hides plugin.")]\r
HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
- [propput, bindable, helpstring("Shows or hides plugin.")]\r
+ [id(DISPID_Visible), propput, bindable, helpstring("Shows or hides plugin.")]\r
HRESULT Visible([in] VARIANT_BOOL visible);\r
[helpstring("Play current target in playlist.")]\r
HRESULT play();\r
HRESULT pause();\r
[helpstring("Stop playback.")]\r
HRESULT stop();\r
- [propget, helpstring("Specifies whether VLC is playing.")]\r
+ [id(DISPID_Playing), bindable, propget, helpstring("Specifies whether VLC is playing.")]\r
HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
- [propput, helpstring("Specifies whether VLC is playing.")]\r
+ [id(DISPID_Playing), bindable, propput, helpstring("Specifies whether VLC is playing.")]\r
HRESULT Playing([in] VARIANT_BOOL isPlaying);\r
- [propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
+ [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.")]\r
HRESULT Position([out, retval] float* position);\r
- [propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
+ [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.")]\r
HRESULT Position([in] float position);\r
- [propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
+ [id(DISPID_Time), bindable, propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
HRESULT Time([out, retval] int* seconds);\r
- [propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
+ [id(DISPID_Time), bindable, propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
HRESULT Time([in] int seconds);\r
[helpstring("Advance or backtrack playback time, relative to current time.")]\r
HRESULT shuttle([in] int seconds);\r
[helpstring("Switch between normal and fullscreen video.")]\r
HRESULT fullscreen();\r
- [propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]\r
+ [id(DISPID_Length), bindable, propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]\r
HRESULT Length([out, retval] int* seconds);\r
[helpstring("Increases playback speed, one of 1x, 2x, 4x, 8x.")]\r
HRESULT playFaster();\r
[helpstring("Decreases playback speed, one of 1x, 2x, 4x, 8x.")]\r
HRESULT playSlower();\r
- [propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
+ [id(DISPID_Volume), bindable, propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
HRESULT Volume([out, retval] int* volume);\r
- [propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
+ [id(DISPID_Volume), bindable, propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
HRESULT Volume([in] int volume);\r
[helpstring("Mute/unmute playback sound volume.")]\r
HRESULT toggleMute();\r
dispinterface DVLCEvents {\r
properties:\r
methods:\r
- [id(1), helpstring("Playback in progress")]\r
+ [id(DISPID_PlayEvent), helpstring("Playback in progress")]\r
void Play();\r
- [id(2), helpstring("Playback has paused")]\r
+ [id(DISPID_PauseEvent), helpstring("Playback has paused")]\r
void Pause();\r
- [id(3), helpstring("Playback has stopped")]\r
+ [id(DISPID_StopEvent), helpstring("Playback has stopped")]\r
void Stop();\r
};\r
\r
--- /dev/null
+[version]\r
+ signature="$CHICAGO$"\r
+ AdvancedINF=2.0\r
+[Add.Code]\r
+ axvlc.dll=axvlc.dll\r
+[axvlc.dll]\r
+ file-win32-x86=thiscab\r
+ clsid={E23FE9C6-778E-49d4-B537-38FCDE4887D8}\r
+ FileVersion=0,8,2,0\r
+ DestDir=10\r
+ RegisterServer=yes\r
-/*****************************************************************************\r
- * axvlc_idl.c: ActiveX control for VLC\r
- *****************************************************************************\r
- * Copyright (C) 2005 VideoLAN\r
- *\r
- * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.\r
- *****************************************************************************/\r
+/* this file contains the actual definitions of */\r
+/* the IIDs and CLSIDs */\r
\r
+/* link this file in with the server and any clients */\r
+\r
+\r
+/* File created by MIDL compiler version 5.01.0164 */\r
+/* at Thu Feb 17 09:25:54 2005\r
+ */\r
+/* Compiler settings for axvlc.idl:\r
+ Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext\r
+ error checks: allocation ref bounds_check enum stub_data \r
+*/\r
+//@@MIDL_FILE_HEADING( )\r
#ifdef __cplusplus\r
extern "C"{\r
#endif \r
-/*****************************************************************************\r
- * axvlc_idl.h: ActiveX control for VLC\r
- *****************************************************************************\r
- * Copyright (C) 2005 VideoLAN\r
- *\r
- * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.\r
- *****************************************************************************/\r
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
+\r
+\r
+/* File created by MIDL compiler version 5.01.0164 */\r
+/* at Thu Feb 17 09:25:54 2005\r
+ */\r
+/* Compiler settings for axvlc.idl:\r
+ Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext\r
+ error checks: allocation ref bounds_check enum stub_data \r
+*/\r
+//@@MIDL_FILE_HEADING( )\r
+\r
\r
/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
};\r
#define VLCPlayListEnd ( -666 )\r
\r
+#define DISPID_Visible ( 1 )\r
+\r
+#define DISPID_Playing ( 2 )\r
+\r
+#define DISPID_Position ( 3 )\r
+\r
+#define DISPID_Time ( 4 )\r
+\r
+#define DISPID_Length ( 5 )\r
+\r
+#define DISPID_Volume ( 6 )\r
+\r
+#define DISPID_PlayEvent ( 1 )\r
+\r
+#define DISPID_PauseEvent ( 2 )\r
+\r
+#define DISPID_StopEvent ( 3 )\r
+\r
\r
EXTERN_C const IID LIBID_AXVLC;\r
\r
virtual /* [helpstring][propput][defaultbind][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Value( \r
/* [in] */ VARIANT pvarValue) = 0;\r
\r
- virtual /* [helpstring][bindable][propget] */ HRESULT STDMETHODCALLTYPE get_Visible( \r
+ virtual /* [helpstring][bindable][propget][id] */ HRESULT STDMETHODCALLTYPE get_Visible( \r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible) = 0;\r
\r
- virtual /* [helpstring][bindable][propput] */ HRESULT STDMETHODCALLTYPE put_Visible( \r
+ virtual /* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE put_Visible( \r
/* [in] */ VARIANT_BOOL visible) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE play( void) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE stop( void) = 0;\r
\r
- virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Playing( \r
+ virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Playing( \r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying) = 0;\r
\r
- virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Playing( \r
+ virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Playing( \r
/* [in] */ VARIANT_BOOL isPlaying) = 0;\r
\r
- virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Position( \r
+ virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Position( \r
/* [retval][out] */ float __RPC_FAR *position) = 0;\r
\r
- virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Position( \r
+ virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Position( \r
/* [in] */ float position) = 0;\r
\r
- virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Time( \r
+ virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Time( \r
/* [retval][out] */ int __RPC_FAR *seconds) = 0;\r
\r
- virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Time( \r
+ virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Time( \r
/* [in] */ int seconds) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE shuttle( \r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE fullscreen( void) = 0;\r
\r
- virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Length( \r
+ virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Length( \r
/* [retval][out] */ int __RPC_FAR *seconds) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playFaster( void) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playSlower( void) = 0;\r
\r
- virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( \r
+ virtual /* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE get_Volume( \r
/* [retval][out] */ int __RPC_FAR *volume) = 0;\r
\r
- virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( \r
+ virtual /* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE put_Volume( \r
/* [in] */ int volume) = 0;\r
\r
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleMute( void) = 0;\r
IVLCControl __RPC_FAR * This,\r
/* [in] */ VARIANT pvarValue);\r
\r
- /* [helpstring][bindable][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Visible )( \r
+ /* [helpstring][bindable][propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Visible )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible);\r
\r
- /* [helpstring][bindable][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Visible )( \r
+ /* [helpstring][bindable][propput][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Visible )( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ VARIANT_BOOL visible);\r
\r
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *stop )( \r
IVLCControl __RPC_FAR * This);\r
\r
- /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Playing )( \r
+ /* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Playing )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);\r
\r
- /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Playing )( \r
+ /* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Playing )( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ VARIANT_BOOL isPlaying);\r
\r
- /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Position )( \r
+ /* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Position )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ float __RPC_FAR *position);\r
\r
- /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Position )( \r
+ /* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Position )( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ float position);\r
\r
- /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Time )( \r
+ /* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Time )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *seconds);\r
\r
- /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Time )( \r
+ /* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Time )( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ int seconds);\r
\r
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *fullscreen )( \r
IVLCControl __RPC_FAR * This);\r
\r
- /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Length )( \r
+ /* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Length )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *seconds);\r
\r
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *playSlower )( \r
IVLCControl __RPC_FAR * This);\r
\r
- /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Volume )( \r
+ /* [helpstring][propget][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Volume )( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *volume);\r
\r
- /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Volume )( \r
+ /* [helpstring][propput][bindable][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Volume )( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ int volume);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][bindable][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Visible_Proxy( \r
+/* [helpstring][bindable][propget][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Visible_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *visible);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][bindable][propput] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Visible_Proxy( \r
+/* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Visible_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ VARIANT_BOOL visible);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy( \r
+/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Playing_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ VARIANT_BOOL __RPC_FAR *isPlaying);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Playing_Proxy( \r
+/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Playing_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ VARIANT_BOOL isPlaying);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy( \r
+/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Position_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ float __RPC_FAR *position);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy( \r
+/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Position_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ float position);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Time_Proxy( \r
+/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Time_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *seconds);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Time_Proxy( \r
+/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Time_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ int seconds);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy( \r
+/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Length_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *seconds);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy( \r
+/* [helpstring][propget][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_get_Volume_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [retval][out] */ int __RPC_FAR *volume);\r
\r
DWORD *_pdwStubPhase);\r
\r
\r
-/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy( \r
+/* [helpstring][propput][bindable][id] */ HRESULT STDMETHODCALLTYPE IVLCControl_put_Volume_Proxy( \r
IVLCControl __RPC_FAR * This,\r
/* [in] */ int volume);\r
\r
#include "plugin.h"\r
\r
#include <comcat.h>\r
+#include <windows.h>\r
+#include <shlwapi.h>\r
\r
using namespace std;\r
\r
+#define COMDLLPATH "axvlc.dll"\r
+#define THREADING_MODEL "Both"\r
+#define COMPANY_STR "VideoLAN"\r
+#define PROGRAM_STR "VLCPlugin"\r
+#define VERSION_MAJOR_STR "1"\r
+#define VERSION_MINOR_STR "0"\r
+#define DESCRIPTION "VideoLAN VLC ActiveX Plugin"\r
+\r
+#define PROGID_STR COMPANY_STR"."PROGRAM_STR\r
+#define VERS_PROGID_STR COMPANY_STR"."PROGRAM_STR"."VERSION_MAJOR_STR\r
+#define VERSION_STR VERSION_MAJOR_STR"."VERSION_MINOR_STR\r
+\r
+#define GUID_STRLEN 39\r
+\r
+/*\r
+** MingW headers do not declare those\r
+*/\r
+extern const CATID CATID_SafeForInitializing;\r
+extern const CATID CATID_SafeForScripting;\r
+\r
static LONG i_class_ref= 0;\r
static HINSTANCE h_instance= 0;\r
\r
return (0 == i_class_ref) ? S_OK: S_FALSE;\r
};\r
\r
-STDAPI DllRegisterServer(VOID)\r
+static LPCTSTR TStrFromGUID(REFGUID clsid) {\r
+ LPOLESTR oleStr;\r
+\r
+ if( FAILED(StringFromIID(clsid, &oleStr)) )\r
+ return NULL;\r
+\r
+ //check whether TCHAR and OLECHAR are both either ANSI or UNICODE\r
+ if( sizeof(TCHAR) == sizeof(OLECHAR) )\r
+ return (LPCTSTR)oleStr;\r
+\r
+ LPTSTR pct_CLSID = NULL;\r
+#ifndef OLE2ANSI\r
+ size_t len = WideCharToMultiByte(CP_ACP, 0, oleStr, -1, NULL, 0, NULL, NULL);\r
+ if( len > 0 )\r
+ {\r
+ pct_CLSID = (char *)CoTaskMemAlloc(len);\r
+ WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len, NULL, NULL);\r
+ }\r
+#else\r
+ size_t len = MutiByteToWideChar(CP_ACP, 0, oleStr, -1, NULL, 0);\r
+ if( len > 0 )\r
+ {\r
+ clsidStr = (wchar_t *)CoTaskMemAlloc(len*sizeof(wchar_t));\r
+ WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len);\r
+ }\r
+#endif\r
+ CoTaskMemFree(oleStr);\r
+ return pct_CLSID;\r
+};\r
+\r
+static HKEY keyCreate(HKEY parentKey, LPCTSTR keyName)\r
{\r
- return S_OK;\r
+ HKEY childKey;\r
+ if( ERROR_SUCCESS == RegCreateKeyEx(parentKey, keyName, 0, NULL,\r
+ REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &childKey, NULL) )\r
+ {\r
+ return childKey;\r
+ }\r
+ return NULL;\r
};\r
\r
STDAPI DllUnregisterServer(VOID)\r
{\r
+ // unregister type lib from the registry\r
+ UnRegisterTypeLib(LIBID_AXVLC, 1, 0, LOCALE_NEUTRAL, SYS_WIN32);\r
+\r
+ // remove component categories we supports\r
+ ICatRegister *pcr;\r
+ if( SUCCEEDED(CoCreateInstance(CLSID_StdComponentCategoriesMgr, \r
+ NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr)) ) {\r
+ CATID implCategories[] = {\r
+ CATID_Control,\r
+ CATID_PersistsToPropertyBag,\r
+ CATID_SafeForInitializing,\r
+ CATID_SafeForScripting,\r
+ };\r
+\r
+ pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin,\r
+ sizeof(implCategories)/sizeof(CATID), implCategories);\r
+ pcr->Release();\r
+ }\r
+\r
+ SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(VERS_PROGID_STR));\r
+ SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));\r
+\r
+ LPCTSTR psz_CLSID = TStrFromGUID(CLSID_VLCPlugin);\r
+\r
+ if( NULL == psz_CLSID )\r
+ return E_OUTOFMEMORY;\r
+\r
+ HKEY hClsIDKey;\r
+ if( ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("CLSID"), 0, KEY_WRITE, &hClsIDKey) )\r
+ {\r
+ SHDeleteKey(hClsIDKey, psz_CLSID);\r
+ RegCloseKey(hClsIDKey);\r
+ }\r
+\r
+ return S_OK;\r
+};\r
+\r
+STDAPI DllRegisterServer(VOID)\r
+{\r
+ DllUnregisterServer();\r
+\r
+ LPCTSTR psz_CLSID = TStrFromGUID(CLSID_VLCPlugin);\r
+\r
+ if( NULL == psz_CLSID )\r
+ return E_OUTOFMEMORY;\r
+\r
+ HKEY hBaseKey;\r
+\r
+ if( ERROR_SUCCESS != RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("CLSID"), 0, KEY_CREATE_SUB_KEY, &hBaseKey) )\r
+ return E_FAIL;\r
+\r
+ HKEY hClassKey = keyCreate(hBaseKey, psz_CLSID);\r
+ if( NULL != hClassKey )\r
+ {\r
+ HKEY hSubKey;\r
+\r
+ // default key value\r
+ RegSetValueEx(hClassKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));\r
+\r
+ // Control key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("Control"));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // InprocServer32 key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("InprocServer32"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)COMDLLPATH, sizeof(COMDLLPATH));\r
+ RegSetValueEx(hSubKey, TEXT("ThreadingModel"), 0, REG_SZ,\r
+ (const BYTE*)THREADING_MODEL, sizeof(THREADING_MODEL));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // MiscStatus key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("MiscStatus\\1"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ, (const BYTE*)"131473", sizeof("131473"));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // Programmable key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("Programmable"));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // ProgID key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("ProgID"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ, \r
+ (const BYTE*)VERS_PROGID_STR, sizeof(VERS_PROGID_STR));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // VersionIndependentProgID key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("VersionIndependentProgID"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ, \r
+ (const BYTE*)PROGID_STR, sizeof(PROGID_STR));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // Version key value\r
+ hSubKey = keyCreate(hClassKey, TEXT("Version"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)VERSION_STR, sizeof(VERSION_STR));\r
+ RegCloseKey(hSubKey);\r
+\r
+ // TypeLib key value\r
+ LPCTSTR psz_LIBID = TStrFromGUID(LIBID_AXVLC);\r
+ if( NULL != psz_LIBID )\r
+ {\r
+ hSubKey = keyCreate(hClassKey, TEXT("TypeLib"));\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)psz_LIBID, sizeof(TCHAR)*GUID_STRLEN);\r
+ RegCloseKey(hSubKey);\r
+ }\r
+ RegCloseKey(hClassKey);\r
+ }\r
+ RegCloseKey(hBaseKey);\r
+\r
+ hBaseKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));\r
+ if( NULL != hBaseKey )\r
+ {\r
+ // default key value\r
+ RegSetValueEx(hBaseKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));\r
+\r
+ HKEY hSubKey = keyCreate(hBaseKey, TEXT("CLSID"));\r
+ if( NULL != hSubKey )\r
+ {\r
+ // default key value\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)psz_CLSID, sizeof(TCHAR)*GUID_STRLEN);\r
+\r
+ RegCloseKey(hSubKey);\r
+ }\r
+ hSubKey = keyCreate(hBaseKey, TEXT("CurVer"));\r
+ if( NULL != hSubKey )\r
+ {\r
+ // default key value\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)VERS_PROGID_STR, sizeof(VERS_PROGID_STR));\r
+\r
+ RegCloseKey(hSubKey);\r
+ }\r
+ RegCloseKey(hBaseKey);\r
+ }\r
+\r
+ hBaseKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(VERS_PROGID_STR));\r
+ if( NULL != hBaseKey )\r
+ {\r
+ // default key value\r
+ RegSetValueEx(hBaseKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)DESCRIPTION, sizeof(DESCRIPTION));\r
+\r
+ HKEY hSubKey = keyCreate(hBaseKey, TEXT("CLSID"));\r
+ if( NULL != hSubKey )\r
+ {\r
+ // default key value\r
+ RegSetValueEx(hSubKey, NULL, 0, REG_SZ,\r
+ (const BYTE*)psz_CLSID, sizeof(TCHAR)*GUID_STRLEN);\r
+\r
+ RegCloseKey(hSubKey);\r
+ }\r
+ RegCloseKey(hBaseKey);\r
+ }\r
+\r
+ // indicate which component categories we support\r
+ ICatRegister *pcr;\r
+ if( SUCCEEDED(CoCreateInstance(CLSID_StdComponentCategoriesMgr, \r
+ NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr)) ) {\r
+ CATID implCategories[] = {\r
+ CATID_Control,\r
+ CATID_PersistsToPropertyBag,\r
+ CATID_SafeForInitializing,\r
+ CATID_SafeForScripting,\r
+ };\r
+\r
+ pcr->RegisterClassImplCategories(CLSID_VLCPlugin,\r
+ sizeof(implCategories)/sizeof(CATID), implCategories);\r
+ pcr->Release();\r
+ }\r
+\r
+ // register type lib into the registry\r
+ ITypeLib *typeLib;\r
+ if( SUCCEEDED(LoadTypeLibEx(OLESTR("")COMDLLPATH, REGKIND_REGISTER, &typeLib)) )\r
+ typeLib->Release();\r
+\r
return S_OK;\r
};\r
\r
/*\r
** easier to debug an application than a DLL on cygwin GDB :)\r
*/\r
-\r
-#include <iostream>\r
+#include <stream.h>\r
\r
STDAPI_(int) WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)\r
{\r
{\r
if( NULL != pdwStatus )\r
return E_POINTER;\r
- \r
- *pdwStatus = OLEMISC_RECOMPOSEONRESIZE\r
- | OLEMISC_CANTLINKINSIDE\r
- | OLEMISC_INSIDEOUT\r
- | OLEMISC_ACTIVATEWHENVISIBLE\r
- | OLEMISC_SETCLIENTSITEFIRST;\r
+\r
+ switch( dwAspect )\r
+ {\r
+ case DVASPECT_CONTENT:\r
+ *pdwStatus = OLEMISC_RECOMPOSEONRESIZE\r
+ | OLEMISC_CANTLINKINSIDE\r
+ | OLEMISC_INSIDEOUT\r
+ | OLEMISC_ACTIVATEWHENVISIBLE\r
+ | OLEMISC_SETCLIENTSITEFIRST;\r
+ break;\r
+ default:\r
+ *pdwStatus = 0;\r
+ }\r
+\r
return S_OK;\r
};\r
\r
V_VT(&value) = VT_BOOL;\r
if( S_OK == pPropBag->Read(OLESTR("showdisplay"), &value, pErrorLog) )\r
{\r
- _p_instance->setShowDisplay(V_BOOL(&value) != VARIANT_FALSE);\r
+ _p_instance->setVisible(V_BOOL(&value) != VARIANT_FALSE);\r
VariantClear(&value);\r
}\r
\r
_psz_src(NULL),\r
_b_autostart(TRUE),\r
_b_loopmode(FALSE),\r
- _b_showdisplay(TRUE),\r
+ _b_visible(TRUE),\r
_b_sendevents(TRUE),\r
_i_vlc(0)\r
{\r
\r
SetWindowLongPtr(_videownd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));\r
\r
+ if( getVisible() )\r
+ ShowWindow(_inplacewnd, SW_SHOWNORMAL);\r
+\r
/* horrible cast there */\r
vlc_value_t val;\r
val.i_int = reinterpret_cast<int>(_videownd);\r
VLC_VariableSet(_i_vlc, "drawable", val);\r
\r
- setVisible(_b_showdisplay);\r
-\r
if( NULL != _psz_src )\r
{\r
// add target to playlist\r
return S_OK;\r
};\r
\r
-BOOL VLCPlugin::isVisible(void)\r
-{\r
- return GetWindowLong(_inplacewnd, GWL_STYLE) & WS_VISIBLE;\r
-};\r
-\r
void VLCPlugin::setVisible(BOOL fVisible)\r
{\r
- ShowWindow(_inplacewnd, fVisible ? SW_SHOW : SW_HIDE);\r
+ _b_visible = fVisible;\r
+ if( isInPlaceActive() )\r
+ ShowWindow(_inplacewnd, fVisible ? SW_SHOWNORMAL : SW_HIDE);\r
+ firePropChangedEvent(DISPID_Visible);\r
};\r
\r
void VLCPlugin::setFocus(BOOL fFocus)\r
UpdateWindow(_videownd);\r
};\r
\r
+void VLCPlugin::firePropChangedEvent(DISPID dispid)\r
+{\r
+ if( _b_sendevents )\r
+ {\r
+ vlcConnectionPointContainer->firePropChangedEvent(dispid); \r
+ }\r
+};\r
+\r
void VLCPlugin::fireOnPlayEvent(void)\r
{\r
if( _b_sendevents )\r
{\r
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};\r
- vlcConnectionPointContainer->fireEvent(1, &dispparamsNoArgs); \r
+ vlcConnectionPointContainer->fireEvent(DISPID_PlayEvent, &dispparamsNoArgs); \r
}\r
};\r
\r
if( _b_sendevents )\r
{\r
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};\r
- vlcConnectionPointContainer->fireEvent(2, &dispparamsNoArgs); \r
+ vlcConnectionPointContainer->fireEvent(DISPID_PauseEvent, &dispparamsNoArgs); \r
}\r
};\r
\r
if( _b_sendevents )\r
{\r
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};\r
- vlcConnectionPointContainer->fireEvent(3, &dispparamsNoArgs); \r
+ vlcConnectionPointContainer->fireEvent(DISPID_StopEvent, &dispparamsNoArgs); \r
}\r
};\r
\r
STDMETHODIMP_(ULONG) Release(void);\r
\r
/* custom methods */\r
- HRESULT getTypeLib(ITypeLib **pTL)\r
- { return LoadRegTypeLib(LIBID_AXVLC, 1, 0, LOCALE_USER_DEFAULT, pTL); };\r
+ HRESULT getTypeLib(LCID lcid, ITypeLib **pTL)\r
+ { return LoadRegTypeLib(LIBID_AXVLC, 1, 0, lcid, pTL); };\r
REFCLSID getClassID(void) { return (REFCLSID)CLSID_VLCPlugin; };\r
REFIID getDispEventID(void) { return (REFIID)DIID_DVLCEvents; };\r
\r
HRESULT onInPlaceDeactivate(void);\r
HWND getInPlaceWindow(void) const { return _inplacewnd; };\r
\r
- BOOL isVisible(void);\r
- void setVisible(BOOL fVisible);\r
-\r
BOOL hasFocus(void);\r
void setFocus(BOOL fFocus);\r
\r
VLC_VolumeMute(_i_vlc);\r
}\r
};\r
- void setShowDisplay(BOOL show) { _b_showdisplay = show; };\r
- BOOL getShowDisplay(void) { return _b_showdisplay; };\r
void setSendEvents(BOOL sendevents) { _b_sendevents = sendevents; };\r
+ void setVisible(BOOL fVisible);\r
+ BOOL getVisible(void) { return _b_visible; };\r
\r
// container events\r
void onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect);\r
void onPaint(PAINTSTRUCT &ps, RECT &pr);\r
\r
// control events\r
+ void firePropChangedEvent(DISPID dispid);\r
void fireOnPlayEvent(void);\r
void fireOnPauseEvent(void);\r
void fireOnStopEvent(void);\r
char *_psz_src;\r
BOOL _b_autostart;\r
BOOL _b_loopmode;\r
- BOOL _b_showdisplay;\r
+ BOOL _b_visible;\r
BOOL _b_sendevents;\r
int _i_vlc;\r
};\r
if( NULL == ppTI )\r
return E_POINTER;\r
\r
- HRESULT hr = _p_instance->getTypeLib(&p_typelib);\r
+ HRESULT hr = _p_instance->getTypeLib(LOCALE_NEUTRAL, &p_typelib);\r
if( SUCCEEDED(hr) )\r
{\r
hr = p_typelib->GetTypeInfoOfGuid(_p_instance->getClassID(), ppTI);\r
<INPUT type=submit value="Go" onClick="go(targetTextField.value);">
</TD></TR>
<TR><TD>
-<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
+<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="axvlc.cab"
width="640" height="480" id="vlc" events="True">
<param name="Src" value="" />
<param name="ShowDisplay" value="True" />
{\r
ITypeLib *p_typelib;\r
\r
- HRESULT hr = _p_instance->getTypeLib(&p_typelib);\r
+ HRESULT hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib);\r
if( SUCCEEDED(hr) )\r
{\r
hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCControl, &_p_typeinfo);\r
if( NULL == isVisible )\r
return E_INVALIDARG;\r
\r
- if( _p_instance->isInPlaceActive() )\r
- *isVisible = _p_instance->isVisible() ? VARIANT_TRUE : VARIANT_FALSE;\r
- else\r
- *isVisible = _p_instance->getShowDisplay() ? VARIANT_TRUE : VARIANT_FALSE;\r
+ *isVisible = _p_instance->getVisible();\r
\r
return NOERROR;\r
};\r
\r
STDMETHODIMP VLCControl::put_Visible(VARIANT_BOOL isVisible)\r
{\r
- if( _p_instance->isInPlaceActive() )\r
- _p_instance->setVisible(isVisible != VARIANT_FALSE);\r
- else\r
- _p_instance->setShowDisplay(isVisible != VARIANT_FALSE);\r
+ _p_instance->setVisible(isVisible != VARIANT_FALSE);\r
\r
return NOERROR;\r
};\r
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
- AC_CHECK_PROG(MIDL, midl, :)
+ AC_CHECK_PROGS(MIDL, [midl widl], no)
AC_CHECK_HEADERS(ole2.h olectl.h,
[ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
- VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid])
+ VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
AC_CHECK_HEADERS(objsafe.h,
VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER])
)
fi
fi
AC_ARG_VAR(MIDL, [Microsoft IDL compiler (Win32 platform only)])
-AM_CONDITIONAL(HAS_MIDL_COMPILER, test -n "${MIDL}")
+AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
AM_CONDITIONAL(BUILD_ACTIVEX,${activex})
dnl