コード例 #1
0
        private void TestEnum()
        {
#if ALLOW_UNTESTED_INTERFACES
            int         hr;
            IEnumPIDMap pEnum;

            hr = m_ipid.EnumPIDMap(out pEnum);
            DsError.ThrowExceptionForHR(hr);
#endif
        }
コード例 #2
0
        private void DumpPIDs()
        {
            int         hr = 0;
            IEnumPIDMap enumPIDMap;
            IEnumPIDMap enumPIDMap2;

            PIDMap[] pids = new PIDMap[1];

            hr = pidMapper.EnumPIDMap(out enumPIDMap);
            DsError.ThrowExceptionForHR(hr);

            hr = enumPIDMap.Clone(out enumPIDMap2);

            while (enumPIDMap2.Next(pids.Length, pids, IntPtr.Zero) == 0)
            {
                Debug.WriteLine(string.Format("{0} : {1}", pids[0].ulPID, pids[0].MediaSampleContent));
            }

            Marshal.ReleaseComObject(enumPIDMap);
        }