| 238 | } |
| 239 | |
| 240 | HRESULT CFlashUI::RegisterEventHandler( BOOL inAdvise ) |
| 241 | { |
| 242 | if (m_pFlash==NULL) |
| 243 | return S_FALSE; |
| 244 | |
| 245 | HRESULT hr=S_FALSE; |
| 246 | CComPtr<IConnectionPointContainer> pCPC; |
| 247 | CComPtr<IConnectionPoint> pCP; |
| 248 | |
| 249 | hr=m_pFlash->QueryInterface(IID_IConnectionPointContainer,(void **)&pCPC); |
| 250 | if (FAILED(hr)) |
| 251 | return hr; |
| 252 | hr=pCPC->FindConnectionPoint(__uuidof(_IShockwaveFlashEvents),&pCP); |
| 253 | if (FAILED(hr)) |
| 254 | return hr; |
| 255 | |
| 256 | if (inAdvise) |
| 257 | { |
| 258 | hr = pCP->Advise((IDispatch*)this, &m_dwCookie); |
| 259 | } |
| 260 | else |
| 261 | { |
| 262 | hr = pCP->Unadvise(m_dwCookie); |
| 263 | } |
| 264 | return hr; |
| 265 | } |
| 266 | |
| 267 | void CFlashUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue ) |
| 268 | { |
nothing calls this directly
no test coverage detected