/// <summary> /// Initializes a new instance of the <see cref="MMEndpoint"/> class based on an /// <see cref="MMDevice"/> by calling its <see cref="ComObject.QueryInterface{T}"/> method. /// </summary> /// <param name="device">The <see cref="MMDevice"/> used to obtain an <see cref="MMEndpoint"/> instance.</param> /// <exception cref="System.ArgumentNullException">device</exception> public MMEndpoint(MMDevice device) { if (device == null) { throw new ArgumentNullException("device"); } BasePtr = device.QueryInterfacePtr(typeof(MMEndpoint).GUID); }