Exemple #1
0
        internal static RLoadOut RIL_Load(string location, Stream stream, string formatType, int frame, Color backgroundColor, LoadOptions loadOptions, Size maxSize, ProgressFnc progressFunction)
        {
            RLoadOut @out;
            int      num;

            try
            {
                @out = new RLoadOut();
                num  = NativeMethods.RIL_Load(location, (stream == null) ? null : ((IIOStream) new IOStream(stream)), formatType, frame, RIL_ColorToCOLORREF(backgroundColor), (int)loadOptions, maxSize, progressFunction, out @out);
            }
            catch
            {
                throw new RILException();
            }
            if (num != 0)
            {
                throw new RILException(num);
            }
            if (@out.Handle != IntPtr.Zero)
            {
                _initializer.AddRef();
            }
            return(@out);
        }
Exemple #2
0
 internal static RLoadOut RIL_Load(string location, Stream stream, string formatType, int frame, Color backgroundColor, LoadOptions loadOptions, Size maxSize, ProgressFnc progressFunction)
 {
     RLoadOut @out;
     int num;
     try
     {
         @out = new RLoadOut();
         num = NativeMethods.RIL_Load(location, (stream == null) ? null : ((IIOStream) new IOStream(stream)), formatType, frame, RIL_ColorToCOLORREF(backgroundColor), (int) loadOptions, maxSize, progressFunction, out @out);
     }
     catch
     {
         throw new RILException();
     }
     if (num != 0)
     {
         throw new RILException(num);
     }
     if (@out.Handle != IntPtr.Zero)
     {
         _initializer.AddRef();
     }
     return @out;
 }