private void TestNext() { int hr; IntPtr ip = Marshal.AllocCoTaskMem(4); Guid [] g = new Guid[3]; string [] s = new string[3]; hr = m_idmo.Next(3, g, s, ip); DsError.ThrowExceptionForHR(hr); Debug.Assert(Marshal.ReadInt32(ip) == 3); Debug.Assert(s[2] != null && g[2] != Guid.Empty, "Next"); Marshal.FreeCoTaskMem(ip); }
private int CountEm(IEnumDMO idmo) { int hr; int iCnt = 0; Guid [] g = new Guid[1]; string [] sn = new string[1]; do { hr = idmo.Next(1, g, sn, IntPtr.Zero); } while (hr == 0 && iCnt++ < 100000); DMOError.ThrowExceptionForHR(hr); return(iCnt); }