void GetPlayerVideoWindowHandle(IltmmPlay *pPlay) { long lWndHandle; HRESULT hr = pPlay->get_VideoWindowHandle(&lWndHandle); if (SUCCEEDED(hr)) { // do something with the window handle } }