| Platform SDK: Broadcast Architecture |
The example that follows illustrates the sequence for co-creating a CSendATVEFInserter object and obtaining its interfaces. Error checking has been omitted for the sake of simplicity.
HRESULT hr;
IUnknown* pIUnknown;
IATVEFInserterConfig* pIInserterConfig;
IATVEFAnnouncement* pIAnnouncement;
IATVEFSend* pISend;
hr = CoCreateInstance (
CLSID_CSendATVEFInserter,
NULL,
CLSCTX_SERVER,
IID_IUnknown,
(void **) &pIUnknown);
hr = pIUnknown -> QueryInterface(
IID_IATVEFInserterConfig,
(void **) & pIInserterConfig
);
hr = pIUnknown -> QueryInterface (
IID_IATVEFAnnouncement,
(void **) & pIAnnouncement
);
hr = pIUnknown -> QueryInterface (
IID_IATVEFSend,
(void **) & pISend
);