*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "plugin.h"
pUnk->AddRef();
cd.pUnk = pUnk;
- *pdwCookie = cd.dwCookie = _connections.size();
+ *pdwCookie = cd.dwCookie = _connections.size()+1;
_connections.push_back(cd);
STDMETHODIMP VLCConnectionPoint::Unadvise(DWORD pdwCookie)
{
- if( pdwCookie < _connections.size() )
+ if( (0 < pdwCookie) && (pdwCookie <= _connections.size()) )
{
- CONNECTDATA cd = _connections[pdwCookie];
+ CONNECTDATA cd = _connections[pdwCookie-1];
if( NULL != cd.pUnk )
{
cd.pUnk->Release();