Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

provideclassinfo.cpp

00001 /*****************************************************************************
00002  * provideclassinfo.cpp: ActiveX control for VLC
00003  *****************************************************************************
00004  * Copyright (C) 2005 the VideoLAN team
00005  *
00006  * Authors: Damien Fouilleul <[email protected]>
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00021  *****************************************************************************/
00022 
00023 #include "plugin.h"
00024 #include "provideclassinfo.h"
00025 
00026 using namespace std;
00027 
00028 STDMETHODIMP VLCProvideClassInfo::GetClassInfo(ITypeInfo **ppTI)
00029 {
00030     ITypeLib *p_typelib;
00031 
00032     if( NULL == ppTI )
00033         return E_POINTER;
00034 
00035     HRESULT hr = _p_instance->getTypeLib(LOCALE_NEUTRAL, &p_typelib);
00036     if( SUCCEEDED(hr) )
00037     {
00038         hr = p_typelib->GetTypeInfoOfGuid(_p_instance->getClassID(), ppTI);
00039         if( FAILED(hr) )
00040         {
00041             *ppTI = NULL;
00042         }
00043         p_typelib->Release();
00044     }
00045     return hr;
00046 };
00047 
00048 STDMETHODIMP VLCProvideClassInfo::GetGUID(DWORD dwGuidKind, GUID *pGUID)
00049 {
00050     if( GUIDKIND_DEFAULT_SOURCE_DISP_IID != dwGuidKind )
00051         return E_INVALIDARG;
00052 
00053     if( NULL == pGUID )
00054         return E_POINTER;
00055 
00056     *pGUID = _p_instance->getDispEventID();
00057 
00058     return S_OK;
00059 };
00060 

Generated on Tue Dec 20 10:14:18 2005 for vlc-0.8.4a by  doxygen 1.4.2