예제 #1
0
 public static extern Int32 PassThruSetConfigIoctl(
     UInt32 ChannelID,
     [MarshalAs(UnmanagedType.U4)]
     PassThruIOControl IoctlID,
     [MarshalAs(UnmanagedType.LPStruct)]
     SetConfigurationList pInput,
     IntPtr pOutput);
예제 #2
0
        /// <summary>
        /// Send the right IoCtls to set up an SSM connection
        /// </summary>
        private void InitializeSsmIoCtl()
        {
            SetConfiguration P1Max    = new SetConfiguration(SetConfigurationParameter.P1Max, 2);
            SetConfiguration P3Min    = new SetConfiguration(SetConfigurationParameter.P3Min, 0);
            SetConfiguration P4Min    = new SetConfiguration(SetConfigurationParameter.P4Min, 0);
            SetConfiguration Loopback = new SetConfiguration(SetConfigurationParameter.Loopback, 1);

            SetConfiguration[] setConfigurationArray = new SetConfiguration[] { P1Max, P3Min, P4Min, Loopback };
            using (SetConfigurationList setConfigurationList = new SetConfigurationList(setConfigurationArray))
            {
                PassThruStatus status = this.implementation.PassThruIoctl(
                    this.channelId,
                    PassThruIOControl.SetConfig,
                    setConfigurationList.Pointer,
                    IntPtr.Zero);
                PassThruUtility.ThrowIfError(status);
            }
        }