コード例 #1
0
ファイル: MMEndpoint.cs プロジェクト: Minep/LunalipseMP_v2
        /// <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);
        }