コード例 #1
0
ファイル: Out123.cs プロジェクト: luca1337/aiv-mpg123
 public void SetParamFloat(Out123.Params aParam, double value)
 {
     Out123.Errors error = Out123NativeMethods.Param(handle, aParam, IntPtr.Zero, value, IntPtr.Zero);
     if (error != Out123.Errors.OK)
     {
         throw new Out123.ErrorException(error);
     }
 }
コード例 #2
0
ファイル: Out123.cs プロジェクト: luca1337/aiv-mpg123
 public void SetParamInt(Out123.Params aParam, long value)
 {
     Out123.Errors error = Out123NativeMethods.Param(handle, aParam, new IntPtr(value), 0, IntPtr.Zero);
     if (error != Out123.Errors.OK)
     {
         throw new Out123.ErrorException(error);
     }
 }
コード例 #3
0
ファイル: Out123.cs プロジェクト: luca1337/aiv-mpg123
        public void SetParamString(Out123.Params aParam, string value)
        {
            IntPtr sValuePtr = IntPtr.Zero;

            if (sValuePtr != null)
            {
                sValuePtr = Marshal.StringToHGlobalAnsi(value);
            }
            Out123.Errors result = Out123NativeMethods.Param(handle, aParam, IntPtr.Zero, 0, sValuePtr);
            if (sValuePtr != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(sValuePtr);
            }
        }