mirror of https://code.videolan.org/videolan/vlc
Win32: use CoInitializeEx() instead of CoInitialize()
That is recommended by MSDN. Also, do not use 0 for NULL.
This commit is contained in:
parent
32bfb8dc02
commit
9b58a46173
|
@ -409,7 +409,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
|
|||
bool b_use_video = true;
|
||||
|
||||
/* Initialize OLE/COM */
|
||||
CoInitialize( 0 );
|
||||
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
||||
|
||||
var_Create( p_this, CFG_PREFIX "config", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
|
||||
var_Create( p_this, CFG_PREFIX "tuner", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
|
||||
|
|
|
@ -369,9 +369,7 @@ BDAGraph::BDAGraph( vlc_object_t *p_this ):
|
|||
p_scanning_tuner = NULL;
|
||||
p_grabber = NULL;
|
||||
|
||||
/* Initialize COM - MS says to use CoInitializeEx in preference to
|
||||
* CoInitialize */
|
||||
CoInitializeEx( 0, COINIT_APARTMENTTHREADED );
|
||||
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
@ -379,7 +379,7 @@ static int DecOpen( decoder_t *p_dec )
|
|||
ldt_fs_t *ldt_fs = Setup_LDT_Keeper();
|
||||
#else
|
||||
/* Initialize OLE/COM */
|
||||
CoInitialize( 0 );
|
||||
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
||||
#endif /* LOADER */
|
||||
|
||||
if( LoadDMO( VLC_OBJECT(p_dec), &hmsdmo_dll, &p_dmo, &p_dec->fmt_in, false )
|
||||
|
|
|
@ -935,7 +935,7 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
|
|||
void SPrefsPanel::assoDialog()
|
||||
{
|
||||
IApplicationAssociationRegistrationUI *p_appassoc;
|
||||
CoInitialize( 0 );
|
||||
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
||||
|
||||
if( S_OK == CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI,
|
||||
NULL, CLSCTX_INPROC_SERVER,
|
||||
|
|
|
@ -79,7 +79,7 @@ void MainInterface::createTaskBarButtons()
|
|||
FIXME:the play button's picture doesn't changed to pause when clicked
|
||||
*/
|
||||
|
||||
CoInitialize( 0 );
|
||||
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
||||
|
||||
if( S_OK == CoCreateInstance( CLSID_TaskbarList,
|
||||
NULL, CLSCTX_INPROC_SERVER,
|
||||
|
|
|
@ -274,7 +274,7 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
|
|||
if (!GetVersionEx(&winVer) || winVer.dwMajorVersion <= 5)
|
||||
return;
|
||||
|
||||
CoInitialize(0);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
void *ptr;
|
||||
if (S_OK == CoCreateInstance(&CLSID_TaskbarList,
|
||||
|
|
Loading…
Reference in New Issue