Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
Typically, a client application displays schedule entry information and enables the user to select an entry for viewing or recording. The application then obtains a TuneRequest object from the Service object associated with the ScheduleEntry object.
The following example function obtains a TuneRequest object from a supplied ScheduleEntry object. For simplicity, error-checking is omitted.
ITuneRequest* GetTuneRequest(IScheduleEntry* pSE)
{
HRESULT hr;
// Get the Service.
IService* pSEService;
hr = pSE->get_Service(&pSEService);
// Get the IUnknown of the TuneRequest.
IUnknown* pUnkTune;
hr = pSEService->get_TuneRequest(&pUnkTune);
return pUnkTune;
}
The IUnknown interface to the TuneRequest object can now be passed to the video control; for example, to the IMSVidCtl::View method. For more information, see Using the Video Control in C++.