Ejemplo n.º 1
0
            private static Result CloneImpl(IntPtr thisPtr, out IntPtr streamPointer)
            {
                streamPointer = IntPtr.Zero;
                var result = Result.Ok;

                try
                {
                    var shadow   = ToShadow <ComStreamShadow>(thisPtr);
                    var callback = ((IStream)shadow.Callback);
                    var clone    = callback.Clone();
                    streamPointer = ComStreamShadow.ToIntPtr(clone);
                }
                catch (SharpDXException exception)
                {
                    result = exception.ResultCode;
                }
                catch (Exception)
                {
                    result = Result.Fail.Code;
                }
                return(result);
            }
Ejemplo n.º 2
0
 public static IntPtr ToIntPtr(IStream stream)
 {
     return(ComStreamShadow.ToIntPtr(stream));
 }