]> git.sesse.net Git - vlc/commitdiff
Turn comment into error message.
authorJean-Paul Saman <jpsaman@videolan.org>
Sat, 14 Jun 2008 09:05:32 +0000 (11:05 +0200)
committerJean-Paul Saman <jpsaman@videolan.org>
Sat, 14 Jun 2008 09:05:32 +0000 (11:05 +0200)
projects/activex/vlccontrol.cpp

index 45347f7d6b5452d22aa9eb6b27e4d8b8ae546928..298a4495062d8db1d9805f31a8c11734ba1ecc76 100644 (file)
@@ -509,16 +509,28 @@ STDMETHODIMP VLCControl::toggleMute(void)
 
 STDMETHODIMP VLCControl::setVariable(BSTR name, VARIANT value)
 {
-    /** setVariable() is an unsafe interface because of security
-      implications it has and is thus removed. */
-    return E_INVALIDARG;
+    libvlc_instance_t* p_libvlc;
+    HRESULT result = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(result) )
+    {
+        _p_instance->setErrorInfo(IID_IVLCControl,
+            "setVariable() is an unsafe interface to use. "
+            "It has been removed because of security implications." );
+    }
+    return E_FAIL;
 };
 
 STDMETHODIMP VLCControl::getVariable(BSTR name, VARIANT *value)
 {
-    /** getVariable() is an unsafe interface because of security
-      implications it has and is thus removed. */
-    return E_INVALIDARG;
+    libvlc_instance_t* p_libvlc;
+    HRESULT result = _p_instance->getVLC(&p_libvlc);
+    if( SUCCEEDED(result) )
+    {
+        _p_instance->setErrorInfo(IID_IVLCControl,
+            "getVariable() is an unsafe interface to use. "
+            "It has been removed because of security implications." );
+    }
+    return E_FAIL;
 };
 
 void VLCControl::FreeTargetOptions(char **cOptions, int cOptionCount)