예제 #1
0
 /// <summary>
 /// Sets a list of configuration parameters for the channel
 /// </summary>
 /// <param name="Parameter">List of parameters to set</param>
 public void SetConfig(SConfig[] SConfig)
 {
     using (HeapSConfigArray hSConfigList = new HeapSConfigArray(SConfig))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.SET_CONFIG, (IntPtr)hSConfigList, IntPtr.Zero));
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Sets a configuration parameter for the channel
 /// </summary>
 /// <param name="Parameter">Parameter to set</param>
 /// <param name="Value">Parameter value</param>
 public void SetConfig(Parameter Parameter, int Value)
 {
     using (HeapSConfigArray hSConfigList = new HeapSConfigArray(new SConfig(Parameter, Value)))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.SET_CONFIG, (IntPtr)hSConfigList, IntPtr.Zero));
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Gets a list of configuration parameters for the channel
 /// </summary>
 /// <param name="Parameter">List of parameters to get</param>
 /// <returns>Parameter list</returns>
 public SConfig[] GetConfig(SConfig[] SConfig)
 {
     using (HeapSConfigArray hSConfigArray = new HeapSConfigArray(SConfig))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.GET_CONFIG, (IntPtr)hSConfigArray, IntPtr.Zero));
         }
         return(hSConfigArray.ToSConfigArray());
     }
 }
예제 #4
0
 /// <summary>
 /// Gets a configuration parameter for the channel
 /// </summary>
 /// <param name="Parameter">Parameter to return</param>
 /// <returns>Parameter value</returns>
 public int GetConfig(Parameter Parameter)
 {
     using (HeapSConfigArray hSConfigArray = new HeapSConfigArray(new SConfig(Parameter, 0)))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.GET_CONFIG, (IntPtr)hSConfigArray, IntPtr.Zero));
         }
         return(hSConfigArray[0].Value);
     }
 }