Commit cbf21b9c authored by Damien Fouilleul's avatar Damien Fouilleul

activex: fixed type library crash (this would cause most programming language...

activex: fixed type library crash (this would cause most programming language to crash), IE does not use type library and was immune to this problem
parent 31a0acaf
...@@ -385,7 +385,7 @@ library AXVLC ...@@ -385,7 +385,7 @@ library AXVLC
HRESULT height([out, retval] long* height); HRESULT height([out, retval] long* height);
[propget, helpstring("Returns video aspect ratio.")] [propget, helpstring("Returns video aspect ratio.")]
HRESULT aspectRatio([out, retval] BSTR aspect); HRESULT aspectRatio([out, retval] BSTR* aspect);
[propput, helpstring("Sets video aspect ratio.")] [propput, helpstring("Sets video aspect ratio.")]
HRESULT aspectRatio([in] BSTR aspect); HRESULT aspectRatio([in] BSTR aspect);
......
No preview for this file type
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 6.00.0361 */ /* File created by MIDL compiler version 6.00.0361 */
/* at Wed Nov 15 18:43:43 2006 /* at Thu Nov 16 09:55:42 2006
*/ */
/* Compiler settings for axvlc.idl: /* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run) Oicf, W1, Zp8, env=Win32 (32b run)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */ /* File created by MIDL compiler version 6.00.0361 */
/* at Wed Nov 15 18:43:43 2006 /* at Thu Nov 16 09:55:42 2006
*/ */
/* Compiler settings for axvlc.idl: /* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run) Oicf, W1, Zp8, env=Win32 (32b run)
...@@ -2709,7 +2709,7 @@ EXTERN_C const IID IID_IVLCVideo; ...@@ -2709,7 +2709,7 @@ EXTERN_C const IID IID_IVLCVideo;
/* [retval][out] */ long *height) = 0; /* [retval][out] */ long *height) = 0;
virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_aspectRatio( virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_aspectRatio(
/* [retval][out] */ BSTR aspect) = 0; /* [retval][out] */ BSTR *aspect) = 0;
virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_aspectRatio( virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_aspectRatio(
/* [in] */ BSTR aspect) = 0; /* [in] */ BSTR aspect) = 0;
...@@ -2782,7 +2782,7 @@ EXTERN_C const IID IID_IVLCVideo; ...@@ -2782,7 +2782,7 @@ EXTERN_C const IID IID_IVLCVideo;
/* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_aspectRatio )( /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_aspectRatio )(
IVLCVideo * This, IVLCVideo * This,
/* [retval][out] */ BSTR aspect); /* [retval][out] */ BSTR *aspect);
/* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_aspectRatio )( /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_aspectRatio )(
IVLCVideo * This, IVLCVideo * This,
...@@ -2905,7 +2905,7 @@ void __RPC_STUB IVLCVideo_get_height_Stub( ...@@ -2905,7 +2905,7 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCVideo_get_aspectRatio_Proxy( /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IVLCVideo_get_aspectRatio_Proxy(
IVLCVideo * This, IVLCVideo * This,
/* [retval][out] */ BSTR aspect); /* [retval][out] */ BSTR *aspect);
void __RPC_STUB IVLCVideo_get_aspectRatio_Stub( void __RPC_STUB IVLCVideo_get_aspectRatio_Stub(
......
...@@ -1758,7 +1758,7 @@ STDMETHODIMP VLCVideo::get_height(long* height) ...@@ -1758,7 +1758,7 @@ STDMETHODIMP VLCVideo::get_height(long* height)
return hr; return hr;
}; };
STDMETHODIMP VLCVideo::get_aspectRatio(BSTR aspect) STDMETHODIMP VLCVideo::get_aspectRatio(BSTR* aspect)
{ {
if( NULL == aspect ) if( NULL == aspect )
return E_POINTER; return E_POINTER;
...@@ -1776,17 +1776,17 @@ STDMETHODIMP VLCVideo::get_aspectRatio(BSTR aspect) ...@@ -1776,17 +1776,17 @@ STDMETHODIMP VLCVideo::get_aspectRatio(BSTR aspect)
char *psz_aspect = libvlc_video_get_aspect_ratio(p_input, &ex); char *psz_aspect = libvlc_video_get_aspect_ratio(p_input, &ex);
libvlc_input_free(p_input); libvlc_input_free(p_input);
if( NULL == psz_aspect )
return E_OUTOFMEMORY;
if( ! libvlc_exception_raised(&ex) ) if( ! libvlc_exception_raised(&ex) )
{ {
aspect = SysAllocStringByteLen(psz_aspect, strlen(psz_aspect)); if( NULL == psz_aspect )
return E_OUTOFMEMORY;
*aspect = SysAllocStringByteLen(psz_aspect, strlen(psz_aspect));
free( psz_aspect ); free( psz_aspect );
psz_aspect = NULL; psz_aspect = NULL;
return NOERROR; return NOERROR;
} }
if( psz_aspect ) free( psz_aspect ); if( psz_aspect ) free( psz_aspect );
} }
_p_instance->setErrorInfo(IID_IVLCVideo, libvlc_exception_get_message(&ex)); _p_instance->setErrorInfo(IID_IVLCVideo, libvlc_exception_get_message(&ex));
libvlc_exception_clear(&ex); libvlc_exception_clear(&ex);
......
...@@ -460,7 +460,7 @@ public: ...@@ -460,7 +460,7 @@ public:
STDMETHODIMP put_fullscreen(VARIANT_BOOL); STDMETHODIMP put_fullscreen(VARIANT_BOOL);
STDMETHODIMP get_width(long*); STDMETHODIMP get_width(long*);
STDMETHODIMP get_height(long*); STDMETHODIMP get_height(long*);
STDMETHODIMP get_aspectRatio(BSTR); STDMETHODIMP get_aspectRatio(BSTR*);
STDMETHODIMP put_aspectRatio(BSTR); STDMETHODIMP put_aspectRatio(BSTR);
STDMETHODIMP toggleFullscreen(); STDMETHODIMP toggleFullscreen();
......
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