Commit 3d831e04 authored by Steve Lhomme's avatar Steve Lhomme

Avoid \r\n problems between platforms

parent cb1f0667
/* this file contains the actual definitions of */ /* this file contains the actual definitions of */
/* the IIDs and CLSIDs */ /* the IIDs and CLSIDs */
/* link this file in with the server and any clients */ /* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */ /* File created by MIDL compiler version 5.01.0164 */
/* at Thu Feb 17 09:25:54 2005 /* at Thu Feb 17 09:25:54 2005
*/ */
/* Compiler settings for axvlc.idl: /* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data error checks: allocation ref bounds_check enum stub_data
*/ */
//@@MIDL_FILE_HEADING( ) //@@MIDL_FILE_HEADING( )
#ifdef __cplusplus #ifdef __cplusplus
extern "C"{ extern "C"{
#endif #endif
#ifndef __IID_DEFINED__ #ifndef __IID_DEFINED__
#define __IID_DEFINED__ #define __IID_DEFINED__
typedef struct _IID typedef struct _IID
{ {
unsigned long x; unsigned long x;
unsigned short s1; unsigned short s1;
unsigned short s2; unsigned short s2;
unsigned char c[8]; unsigned char c[8];
} IID; } IID;
#endif // __IID_DEFINED__ #endif // __IID_DEFINED__
#ifndef CLSID_DEFINED #ifndef CLSID_DEFINED
#define CLSID_DEFINED #define CLSID_DEFINED
typedef IID CLSID; typedef IID CLSID;
#endif // CLSID_DEFINED #endif // CLSID_DEFINED
const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}}; const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}};
const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}}; const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}};
const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}}; const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}};
const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}}; const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}};
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
This diff is collapsed.
This diff is collapsed.
/***************************************************************************** /*****************************************************************************
* connectioncontainer.h: ActiveX control for VLC * connectioncontainer.h: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __CONNECTIONCONTAINER_H__ #ifndef __CONNECTIONCONTAINER_H__
#define __CONNECTIONCONTAINER_H__ #define __CONNECTIONCONTAINER_H__
#include <ocidl.h> #include <ocidl.h>
#include <vector> #include <vector>
using namespace std; using namespace std;
class VLCConnectionPoint : public IConnectionPoint class VLCConnectionPoint : public IConnectionPoint
{ {
public: public:
VLCConnectionPoint(IConnectionPointContainer *p_cpc, REFIID iid) : VLCConnectionPoint(IConnectionPointContainer *p_cpc, REFIID iid) :
_iid(iid), _p_cpc(p_cpc) {}; _iid(iid), _p_cpc(p_cpc) {};
virtual ~VLCConnectionPoint() {}; virtual ~VLCConnectionPoint() {};
// IUnknown methods // IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ {
if( NULL == ppv ) return E_POINTER; if( NULL == ppv ) return E_POINTER;
if( (IID_IUnknown == riid) if( (IID_IUnknown == riid)
&& (IID_IConnectionPoint == riid) ) { && (IID_IConnectionPoint == riid) ) {
AddRef(); AddRef();
*ppv = reinterpret_cast<LPVOID>(this); *ppv = reinterpret_cast<LPVOID>(this);
return NOERROR; return NOERROR;
} }
// must be a standalone object // must be a standalone object
return E_NOINTERFACE; return E_NOINTERFACE;
}; };
STDMETHODIMP_(ULONG) AddRef(void) { return _p_cpc->AddRef(); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_cpc->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_cpc->Release(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_cpc->Release(); };
// IConnectionPoint methods // IConnectionPoint methods
STDMETHODIMP GetConnectionInterface(IID *); STDMETHODIMP GetConnectionInterface(IID *);
STDMETHODIMP GetConnectionPointContainer(LPCONNECTIONPOINTCONTAINER *); STDMETHODIMP GetConnectionPointContainer(LPCONNECTIONPOINTCONTAINER *);
STDMETHODIMP Advise(IUnknown *, DWORD *); STDMETHODIMP Advise(IUnknown *, DWORD *);
STDMETHODIMP Unadvise(DWORD); STDMETHODIMP Unadvise(DWORD);
STDMETHODIMP EnumConnections(LPENUMCONNECTIONS *); STDMETHODIMP EnumConnections(LPENUMCONNECTIONS *);
void fireEvent(DISPID dispIdMember, DISPPARAMS* pDispParams); void fireEvent(DISPID dispIdMember, DISPPARAMS* pDispParams);
void firePropChangedEvent(DISPID dispId); void firePropChangedEvent(DISPID dispId);
private: private:
REFIID _iid; REFIID _iid;
IConnectionPointContainer *_p_cpc; IConnectionPointContainer *_p_cpc;
vector<CONNECTDATA> _connections; vector<CONNECTDATA> _connections;
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class VLCConnectionPointContainer : public IConnectionPointContainer class VLCConnectionPointContainer : public IConnectionPointContainer
{ {
public: public:
VLCConnectionPointContainer(VLCPlugin *p_instance); VLCConnectionPointContainer(VLCPlugin *p_instance);
virtual ~VLCConnectionPointContainer(); virtual ~VLCConnectionPointContainer();
// IUnknown methods // IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ {
if( (NULL != ppv) if( (NULL != ppv)
&& (IID_IUnknown == riid) && (IID_IUnknown == riid)
&& (IID_IConnectionPointContainer == riid) ) { && (IID_IConnectionPointContainer == riid) ) {
AddRef(); AddRef();
*ppv = reinterpret_cast<LPVOID>(this); *ppv = reinterpret_cast<LPVOID>(this);
return NOERROR; return NOERROR;
} }
return _p_instance->QueryInterface(riid, ppv); return _p_instance->QueryInterface(riid, ppv);
}; };
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IConnectionPointContainer methods // IConnectionPointContainer methods
STDMETHODIMP EnumConnectionPoints(LPENUMCONNECTIONPOINTS *); STDMETHODIMP EnumConnectionPoints(LPENUMCONNECTIONPOINTS *);
STDMETHODIMP FindConnectionPoint(REFIID, LPCONNECTIONPOINT *); STDMETHODIMP FindConnectionPoint(REFIID, LPCONNECTIONPOINT *);
void fireEvent(DISPID, DISPPARAMS*); void fireEvent(DISPID, DISPPARAMS*);
void firePropChangedEvent(DISPID dispId); void firePropChangedEvent(DISPID dispId);
private: private:
VLCPlugin *_p_instance; VLCPlugin *_p_instance;
VLCConnectionPoint *_p_events; VLCConnectionPoint *_p_events;
VLCConnectionPoint *_p_props; VLCConnectionPoint *_p_props;
vector<LPCONNECTIONPOINT> _v_cps; vector<LPCONNECTIONPOINT> _v_cps;
}; };
#endif #endif
This diff is collapsed.
/***************************************************************************** /*****************************************************************************
* objectsafety.cpp: ActiveX control for VLC * objectsafety.cpp: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include "plugin.h" #include "plugin.h"
#include "objectsafety.h" #include "objectsafety.h"
#include "axvlc_idl.h" #include "axvlc_idl.h"
#if 0 #if 0
const GUID IID_IObjectSafety = const GUID IID_IObjectSafety =
{0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}}; {0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}};
#endif #endif
STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions( STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD *pdwSupportedOptions, DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions DWORD *pdwEnabledOptions
) )
{ {
if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) ) if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) )
return E_POINTER; return E_POINTER;
*pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER; *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER;
if( (IID_IDispatch == riid) if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) ) || (IID_IVLCControl == riid) )
{ {
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER; *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;
return NOERROR; return NOERROR;
} }
else if( (IID_IPersist == riid) else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid) || (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid) || (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) ) || (IID_IPersistPropertyBag == riid) )
{ {
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA; *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA;
return NOERROR; return NOERROR;
} }
*pdwEnabledOptions = 0; *pdwEnabledOptions = 0;
return E_NOINTERFACE; return E_NOINTERFACE;
}; };
STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions( STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD dwOptionSetMask, DWORD dwOptionSetMask,
DWORD dwEnabledOptions DWORD dwEnabledOptions
) )
{ {
if( (IID_IDispatch == riid) if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) ) || (IID_IVLCControl == riid) )
{ {
if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask) if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) ) && (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) )
{ {
return NOERROR; return NOERROR;
} }
return E_FAIL; return E_FAIL;
} }
else if( (IID_IPersist == riid) else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid) || (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid) || (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) ) || (IID_IPersistPropertyBag == riid) )
{ {
if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask) if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) ) && (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) )
{ {
return NOERROR; return NOERROR;
} }
return E_FAIL; return E_FAIL;
} }
return E_FAIL; return E_FAIL;
}; };
/***************************************************************************** /*****************************************************************************
* objectsafety.h: ActiveX control for VLC * objectsafety.h: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __OBJECTSAFETY_H__ #ifndef __OBJECTSAFETY_H__
#define __OBJECTSAFETY_H__ #define __OBJECTSAFETY_H__
#if HAVE_OBJSAFE_HEADER #if HAVE_OBJSAFE_HEADER
/* /*
** at last, a version of mingw that supports this header ** at last, a version of mingw that supports this header
*/ */
#include <objsafe.h> #include <objsafe.h>
#else #else
// {CB5BDC81-93C1-11cf-8F20-00805F2CD064} // {CB5BDC81-93C1-11cf-8F20-00805F2CD064}
extern "C" const IID IID_IObjectSafety; extern "C" const IID IID_IObjectSafety;
#define INTERFACESAFE_FOR_UNTRUSTED_CALLER 1L #define INTERFACESAFE_FOR_UNTRUSTED_CALLER 1L
#define INTERFACESAFE_FOR_UNTRUSTED_DATA 2L #define INTERFACESAFE_FOR_UNTRUSTED_DATA 2L
struct IObjectSafety : public IUnknown struct IObjectSafety : public IUnknown
{ {
virtual STDMETHODIMP GetInterfaceSafetyOptions( virtual STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD __RPC_FAR *pdwSupportedOptions, DWORD __RPC_FAR *pdwSupportedOptions,
DWORD __RPC_FAR *pdwEnabledOptions DWORD __RPC_FAR *pdwEnabledOptions
) = 0; ) = 0;
virtual STDMETHODIMP SetInterfaceSafetyOptions( virtual STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD dwSupportedOptions, DWORD dwSupportedOptions,
DWORD dwOptionSetMask DWORD dwOptionSetMask
) = 0; ) = 0;
}; };
#endif #endif
class VLCObjectSafety : public IObjectSafety class VLCObjectSafety : public IObjectSafety
{ {
public: public:
VLCObjectSafety(VLCPlugin *p_instance) : _p_instance(p_instance) {}; VLCObjectSafety(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCObjectSafety() {}; virtual ~VLCObjectSafety() {};
// IUnknown methods // IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ {
if( (NULL != ppv) if( (NULL != ppv)
&& (IID_IUnknown == riid) && (IID_IUnknown == riid)
&& (IID_IObjectSafety == riid) ) && (IID_IObjectSafety == riid) )
{ {
AddRef(); AddRef();
*ppv = reinterpret_cast<LPVOID>(this); *ppv = reinterpret_cast<LPVOID>(this);
return NOERROR; return NOERROR;
} }
return _p_instance->QueryInterface(riid, ppv); return _p_instance->QueryInterface(riid, ppv);
}; };
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IUnknown methods // IUnknown methods
STDMETHODIMP GetInterfaceSafetyOptions( STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD *pdwSupportedOptions, DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions DWORD *pdwEnabledOptions
); );
STDMETHODIMP SetInterfaceSafetyOptions( STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid, REFIID riid,
DWORD dwOptionSetMask, DWORD dwOptionSetMask,
DWORD dwEnabledOptions DWORD dwEnabledOptions
); );
private: private:
VLCPlugin *_p_instance; VLCPlugin *_p_instance;
}; };
#endif #endif
/***************************************************************************** /*****************************************************************************
* olecontrol.cpp: ActiveX control for VLC * olecontrol.cpp: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include "plugin.h" #include "plugin.h"
#include "olecontrol.h" #include "olecontrol.h"
#include "utils.h" #include "utils.h"
using namespace std; using namespace std;
STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI) STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI)
{ {
if( NULL == pCI ) if( NULL == pCI )
return E_POINTER; return E_POINTER;
pCI->cb = sizeof(CONTROLINFO); pCI->cb = sizeof(CONTROLINFO);
pCI->hAccel = NULL; pCI->hAccel = NULL;
pCI->cAccel = 0; pCI->cAccel = 0;
pCI->dwFlags = 0; pCI->dwFlags = 0;
return S_OK; return S_OK;
}; };
STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg) STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v) static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v)
{ {
HRESULT hr; HRESULT hr;
IOleObject *oleObj; IOleObject *oleObj;
hr = instance.QueryInterface(IID_IOleObject, (LPVOID *)&oleObj); hr = instance.QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
if( SUCCEEDED(hr) ) if( SUCCEEDED(hr) )
{ {
IOleClientSite *clientSite; IOleClientSite *clientSite;
hr = oleObj->GetClientSite(&clientSite); hr = oleObj->GetClientSite(&clientSite);
if( SUCCEEDED(hr) && (NULL != clientSite) ) if( SUCCEEDED(hr) && (NULL != clientSite) )
{ {
hr = GetObjectProperty(clientSite, dispID, v); hr = GetObjectProperty(clientSite, dispID, v);
clientSite->Release(); clientSite->Release();
} }
oleObj->Release(); oleObj->Release();
} }
return hr; return hr;
}; };
STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID) STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
{ {
switch( dispID ) switch( dispID )
{ {
case DISPID_AMBIENT_BACKCOLOR: case DISPID_AMBIENT_BACKCOLOR:
break; break;
case DISPID_AMBIENT_DISPLAYNAME: case DISPID_AMBIENT_DISPLAYNAME:
break; break;
case DISPID_AMBIENT_FONT: case DISPID_AMBIENT_FONT:
break; break;
case DISPID_AMBIENT_FORECOLOR: case DISPID_AMBIENT_FORECOLOR:
break; break;
case DISPID_AMBIENT_LOCALEID: case DISPID_AMBIENT_LOCALEID:
break; break;
case DISPID_AMBIENT_MESSAGEREFLECT: case DISPID_AMBIENT_MESSAGEREFLECT:
break; break;
case DISPID_AMBIENT_SCALEUNITS: case DISPID_AMBIENT_SCALEUNITS:
break; break;
case DISPID_AMBIENT_TEXTALIGN: case DISPID_AMBIENT_TEXTALIGN:
break; break;
case DISPID_AMBIENT_USERMODE: case DISPID_AMBIENT_USERMODE:
break; break;
case DISPID_AMBIENT_UIDEAD: case DISPID_AMBIENT_UIDEAD:
break; break;
case DISPID_AMBIENT_SHOWGRABHANDLES: case DISPID_AMBIENT_SHOWGRABHANDLES:
break; break;
case DISPID_AMBIENT_SHOWHATCHING: case DISPID_AMBIENT_SHOWHATCHING:
break; break;
case DISPID_AMBIENT_DISPLAYASDEFAULT: case DISPID_AMBIENT_DISPLAYASDEFAULT:
break; break;
case DISPID_AMBIENT_SUPPORTSMNEMONICS: case DISPID_AMBIENT_SUPPORTSMNEMONICS:
break; break;
case DISPID_AMBIENT_AUTOCLIP: case DISPID_AMBIENT_AUTOCLIP:
break; break;
case DISPID_AMBIENT_APPEARANCE: case DISPID_AMBIENT_APPEARANCE:
break; break;
case DISPID_AMBIENT_CODEPAGE: case DISPID_AMBIENT_CODEPAGE:
VARIANT v; VARIANT v;
VariantInit(&v); VariantInit(&v);
V_VT(&v) = VT_I4; V_VT(&v) = VT_I4;
if( SUCCEEDED(getAmbientProperty(*_p_instance, dispID, v)) ) if( SUCCEEDED(getAmbientProperty(*_p_instance, dispID, v)) )
{ {
_p_instance->setCodePage(V_I4(&v)); _p_instance->setCodePage(V_I4(&v));
} }
break; break;
case DISPID_AMBIENT_PALETTE: case DISPID_AMBIENT_PALETTE:
break; break;
case DISPID_AMBIENT_CHARSET: case DISPID_AMBIENT_CHARSET:
break; break;
case DISPID_AMBIENT_RIGHTTOLEFT: case DISPID_AMBIENT_RIGHTTOLEFT:
break; break;
case DISPID_AMBIENT_TOPTOBOTTOM: case DISPID_AMBIENT_TOPTOBOTTOM:
break; break;
default: default:
break; break;
} }
return S_OK; return S_OK;
}; };
STDMETHODIMP VLCOleControl::FreezeEvents(BOOL bFreeze) STDMETHODIMP VLCOleControl::FreezeEvents(BOOL bFreeze)
{ {
_p_instance->setSendEvents(! bFreeze); _p_instance->setSendEvents(! bFreeze);
return S_OK; return S_OK;
}; };
/***************************************************************************** /*****************************************************************************
* olecontrol.h: ActiveX control for VLC * olecontrol.h: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __OLECONTROL_H__ #ifndef __OLECONTROL_H__
#define __OLECONTROL_H__ #define __OLECONTROL_H__
#include <olectl.h> #include <olectl.h>
class VLCOleControl : public IOleControl class VLCOleControl : public IOleControl
{ {
public: public:
VLCOleControl(VLCPlugin *p_instance) : _p_instance(p_instance) {}; VLCOleControl(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleControl() {}; virtual ~VLCOleControl() {};
// IUnknown methods // IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ {
if( (NULL != ppv) if( (NULL != ppv)
&& (IID_IUnknown == riid) && (IID_IUnknown == riid)
&& (IID_IOleControl == riid) ) && (IID_IOleControl == riid) )
{ {
AddRef(); AddRef();
*ppv = reinterpret_cast<LPVOID>(this); *ppv = reinterpret_cast<LPVOID>(this);
return NOERROR; return NOERROR;
} }
return _p_instance->QueryInterface(riid, ppv); return _p_instance->QueryInterface(riid, ppv);
}; };
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleControl methods // IOleControl methods
STDMETHODIMP GetControlInfo(CONTROLINFO *pCI); STDMETHODIMP GetControlInfo(CONTROLINFO *pCI);
STDMETHODIMP OnMnemonic(LPMSG pMsg); STDMETHODIMP OnMnemonic(LPMSG pMsg);
STDMETHODIMP OnAmbientPropertyChange(DISPID dispID); STDMETHODIMP OnAmbientPropertyChange(DISPID dispID);
STDMETHODIMP FreezeEvents(BOOL bFreeze); STDMETHODIMP FreezeEvents(BOOL bFreeze);
private: private:
VLCPlugin *_p_instance; VLCPlugin *_p_instance;
}; };
#endif #endif
/***************************************************************************** /*****************************************************************************
* oleinplaceactiveobject.cpp: ActiveX control for VLC * oleinplaceactiveobject.cpp: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include "plugin.h" #include "plugin.h"
#include "oleinplaceactiveobject.h" #include "oleinplaceactiveobject.h"
using namespace std; using namespace std;
STDMETHODIMP VLCOleInPlaceActiveObject::GetWindow(HWND *pHwnd) STDMETHODIMP VLCOleInPlaceActiveObject::GetWindow(HWND *pHwnd)
{ {
if( NULL == pHwnd ) if( NULL == pHwnd )
return E_INVALIDARG; return E_INVALIDARG;
if( _p_instance->isInPlaceActive() ) if( _p_instance->isInPlaceActive() )
{ {
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) ) if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK; return S_OK;
return E_FAIL; return E_FAIL;
} }
*pHwnd = NULL; *pHwnd = NULL;
return E_UNEXPECTED; return E_UNEXPECTED;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::EnableModeless(BOOL fEnable) STDMETHODIMP VLCOleInPlaceActiveObject::EnableModeless(BOOL fEnable)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::ContextSensitiveHelp(BOOL fEnterMode) STDMETHODIMP VLCOleInPlaceActiveObject::ContextSensitiveHelp(BOOL fEnterMode)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::TranslateAccelerator(LPMSG lpmsg) STDMETHODIMP VLCOleInPlaceActiveObject::TranslateAccelerator(LPMSG lpmsg)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::OnFrameWindowActivate(BOOL fActivate) STDMETHODIMP VLCOleInPlaceActiveObject::OnFrameWindowActivate(BOOL fActivate)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::OnDocWindowActivate(BOOL fActivate) STDMETHODIMP VLCOleInPlaceActiveObject::OnDocWindowActivate(BOOL fActivate)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceActiveObject::ResizeBorder(LPCRECT prcBorder, LPOLEINPLACEUIWINDOW pUIWindow, BOOL fFrameWindow) STDMETHODIMP VLCOleInPlaceActiveObject::ResizeBorder(LPCRECT prcBorder, LPOLEINPLACEUIWINDOW pUIWindow, BOOL fFrameWindow)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
/***************************************************************************** /*****************************************************************************
* oleinplaceactiveobject.h: ActiveX control for VLC * oleinplaceactiveobject.h: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __OLEINPLACEACTIVEOBJECT_H__ #ifndef __OLEINPLACEACTIVEOBJECT_H__
#define __OLEINPLACEACTIVEOBJECT_H__ #define __OLEINPLACEACTIVEOBJECT_H__
#include "oleidl.h" #include "oleidl.h"
class VLCOleInPlaceActiveObject : public IOleInPlaceActiveObject class VLCOleInPlaceActiveObject : public IOleInPlaceActiveObject
{ {
public: public:
VLCOleInPlaceActiveObject(VLCPlugin *p_instance) : _p_instance(p_instance) {}; VLCOleInPlaceActiveObject(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleInPlaceActiveObject() {}; virtual ~VLCOleInPlaceActiveObject() {};
// IUnknown methods // IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ {
if( (NULL != ppv) if( (NULL != ppv)
&& (IID_IUnknown == riid) && (IID_IUnknown == riid)
&& (IID_IOleWindow == riid) && (IID_IOleWindow == riid)
&& (IID_IOleInPlaceActiveObject == riid) ) && (IID_IOleInPlaceActiveObject == riid) )
{ {
AddRef(); AddRef();
*ppv = reinterpret_cast<LPVOID>(this); *ppv = reinterpret_cast<LPVOID>(this);
return NOERROR; return NOERROR;
} }
return _p_instance->QueryInterface(riid, ppv); return _p_instance->QueryInterface(riid, ppv);
}; };
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleWindow methods // IOleWindow methods
STDMETHODIMP GetWindow(HWND *); STDMETHODIMP GetWindow(HWND *);
STDMETHODIMP ContextSensitiveHelp(BOOL); STDMETHODIMP ContextSensitiveHelp(BOOL);
// IOleInPlaceActiveObject methods // IOleInPlaceActiveObject methods
STDMETHODIMP EnableModeless(BOOL); STDMETHODIMP EnableModeless(BOOL);
STDMETHODIMP TranslateAccelerator(LPMSG); STDMETHODIMP TranslateAccelerator(LPMSG);
STDMETHODIMP OnFrameWindowActivate(BOOL); STDMETHODIMP OnFrameWindowActivate(BOOL);
STDMETHODIMP OnDocWindowActivate(BOOL); STDMETHODIMP OnDocWindowActivate(BOOL);
STDMETHODIMP ResizeBorder(LPCRECT, LPOLEINPLACEUIWINDOW, BOOL); STDMETHODIMP ResizeBorder(LPCRECT, LPOLEINPLACEUIWINDOW, BOOL);
private: private:
VLCPlugin *_p_instance; VLCPlugin *_p_instance;
}; };
#endif #endif
/***************************************************************************** /*****************************************************************************
* oleinplaceobject.cpp: ActiveX control for VLC * oleinplaceobject.cpp: ActiveX control for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 VideoLAN * Copyright (C) 2005 VideoLAN
* *
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#include "plugin.h" #include "plugin.h"
#include "oleinplaceobject.h" #include "oleinplaceobject.h"
#include <docobj.h> #include <docobj.h>
using namespace std; using namespace std;
STDMETHODIMP VLCOleInPlaceObject::GetWindow(HWND *pHwnd) STDMETHODIMP VLCOleInPlaceObject::GetWindow(HWND *pHwnd)
{ {
if( NULL == pHwnd ) if( NULL == pHwnd )
return E_INVALIDARG; return E_INVALIDARG;
if( _p_instance->isInPlaceActive() ) if( _p_instance->isInPlaceActive() )
{ {
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) ) if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK; return S_OK;
return E_FAIL; return E_FAIL;
} }
*pHwnd = NULL; *pHwnd = NULL;
return E_UNEXPECTED; return E_UNEXPECTED;
}; };
STDMETHODIMP VLCOleInPlaceObject::ContextSensitiveHelp(BOOL fEnterMode) STDMETHODIMP VLCOleInPlaceObject::ContextSensitiveHelp(BOOL fEnterMode)
{ {
return E_NOTIMPL; return E_NOTIMPL;
}; };
STDMETHODIMP VLCOleInPlaceObject::InPlaceDeactivate(void) STDMETHODIMP VLCOleInPlaceObject::InPlaceDeactivate(void)
{ {
if( _p_instance->isInPlaceActive() ) if( _p_instance->isInPlaceActive() )
{ {
UIDeactivate(); UIDeactivate();
_p_instance->onInPlaceDeactivate(); _p_instance->onInPlaceDeactivate();
LPOLEOBJECT p_oleObject; LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) ) if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{ {
LPOLECLIENTSITE p_clientSite; LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) ) if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{ {
LPOLEINPLACESITE p_inPlaceSite; LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) ) if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{ {
p_inPlaceSite->OnInPlaceDeactivate(); p_inPlaceSite->OnInPlaceDeactivate();
p_inPlaceSite->Release(); p_inPlaceSite->Release();
} }
p_clientSite->Release(); p_clientSite->Release();
} }
p_oleObject->Release(); p_oleObject->Release();
} }
return S_OK; return S_OK;
} }
return E_UNEXPECTED; return E_UNEXPECTED;
}; };
STDMETHODIMP VLCOleInPlaceObject::UIDeactivate(void) STDMETHODIMP VLCOleInPlaceObject::UIDeactivate(void)
{ {
if( _p_instance->isInPlaceActive() ) if( _p_instance->isInPlaceActive() )
{ {
if( _p_instance->hasFocus() ) if( _p_instance->hasFocus() )
{ {
_p_instance->setFocus(FALSE); _p_instance->setFocus(FALSE);
LPOLEOBJECT p_oleObject; LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) ) if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{ {
LPOLECLIENTSITE p_clientSite; LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) ) if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{ {
LPOLEINPLACESITE p_inPlaceSite; LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) ) if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{ {
p_inPlaceSite->OnUIDeactivate(FALSE); p_inPlaceSite->OnUIDeactivate(FALSE);
p_inPlaceSite->Release(); p_inPlaceSite->Release();
} }
p_clientSite->Release(); p_clientSite->Release();
} }
p_oleObject->Release(); p_oleObject->Release();
} }
return S_OK; return S_OK;
} }
} }
return E_UNEXPECTED; return E_UNEXPECTED;
}; };
STDMETHODIMP VLCOleInPlaceObject::SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect) STDMETHODIMP VLCOleInPlaceObject::SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
{ {
if( _p_instance->isInPlaceActive() ) if( _p_instance->isInPlaceActive() )
{ {
_p_instance->onPositionChange(lprcPosRect, lprcClipRect); _p_instance->onPositionChange(lprcPosRect, lprcClipRect);
return S_OK; return S_OK;
} }
return E_UNEXPECTED; return E_UNEXPECTED;
}; };
STDMETHODIMP VLCOleInPlaceObject::ReactivateAndUndo(void) STDMETHODIMP VLCOleInPlaceObject::ReactivateAndUndo(void)
{ {
return INPLACE_E_NOTUNDOABLE; return INPLACE_E_NOTUNDOABLE;
}; };
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* beos_specific.h: BeOS specific features * beos_specific.h: BeOS specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: beos_specific.h,v 1.9 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* charset.h: Determine a canonical name for the current locale's character encoding. * charset.h: Determine a canonical name for the current locale's character encoding.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: charset.h,v 1.3 2004/02/21 23:15:52 gbazin Exp $ * $Id$
* *
* Author: Derk-Jan Hartman <thedj at users.sourceforge.net> * Author: Derk-Jan Hartman <thedj at users.sourceforge.net>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_eject.h: CD/DVD-ROM ejection handling functions * intf_eject.h: CD/DVD-ROM ejection handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.h,v 1.6 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Author: Julien Blache <jb@technologeek.org> * Author: Julien Blache <jb@technologeek.org>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* iso_lang.h: function to decode language code (in dvd or a52 for instance). * iso_lang.h: function to decode language code (in dvd or a52 for instance).
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: iso_lang.h,v 1.9 2003/10/24 17:41:58 sam Exp $ * $Id$
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* os_specific.h: OS specific features * os_specific.h: OS specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: os_specific.h,v 1.13 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout.h: audio output header for vlc * aout.h: audio output header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: aout.h,v 1.2 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* sout.h: video output header for vlc * sout.h: video output header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: sout.h,v 1.4 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* bits.h : * bits.h :
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlc_bits.h,v 1.1 2003/11/18 20:15:38 fenrir Exp $ * $Id$
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cpu.h: CPU type detection * cpu.h: CPU type detection
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlc_cpu.h,v 1.6 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc_error.h: error handling routine * vlc_error.h: error handling routine
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlc_error.h,v 1.1 2003/07/01 12:56:47 sam Exp $ * $Id$
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as message output. * interface, such as message output.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_messages.h,v 1.11 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_specific.h: Win32 specific features * win32_specific.h: Win32 specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: win32_specific.h,v 1.5 2004/01/25 18:17:08 zorglub Exp $ * $Id$
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* beos.cpp: Screen capture module. * beos.cpp: Screen capture module.
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: screen.c 8284 2004-07-26 10:27:55Z gbazin $ * $Id$
* *
* Authors: Eric Petit <titer@m0k.org> * Authors: Eric Petit <titer@m0k.org>
* *
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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