Exemplo n.º 1
0
 public unsafe StorageStatistics GetStatistics(StorageStatisticsFlags grfStatFlag)
 {
     StorageStatistics.__Native @ref = new StorageStatistics.__Native();
       // ISSUE: cast to a function pointer type
       // ISSUE: function pointer call
       Result result = (Result) (__calli((__FnPtr<int (void*, void*, int)>) *(IntPtr*) (*(IntPtr*) this._nativePointer + IntPtr(12) * sizeof (void*)))((int) this._nativePointer, (void*) &@ref, (void*) grfStatFlag));
       StorageStatistics storageStatistics = new StorageStatistics();
       storageStatistics.__MarshalFrom(ref @ref);
       result.CheckError();
       return storageStatistics;
 }
Exemplo n.º 2
0
        public unsafe StorageStatistics GetStatistics(StorageStatisticsFlags grfStatFlag)
        {
            StorageStatistics.__Native @ref = new StorageStatistics.__Native();
            // ISSUE: cast to a function pointer type
            // ISSUE: function pointer call
            Result            result            = (Result)(__calli((__FnPtr <int (void *, void *, int)>) * (IntPtr *)(*(IntPtr *)this._nativePointer + IntPtr(12) * sizeof(void *)))((int)this._nativePointer, (void *)&@ref, (void *)grfStatFlag));
            StorageStatistics storageStatistics = new StorageStatistics();

            storageStatistics.__MarshalFrom(ref @ref);
            result.CheckError();
            return(storageStatistics);
        }
Exemplo n.º 3
0
 public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
 {
     long num = this.sourceStream.Length;
       if (num == 0L)
     num = (long) int.MaxValue;
       return new StorageStatistics()
       {
     Type = 2,
     CbSize = num,
     GrfLocksSupported = 2,
     GrfMode = 2
       };
 }
Exemplo n.º 4
0
 public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
 {
   long num = this.sourceStream.Length;
   if (num == 0L)
     num = (long) int.MaxValue;
   return new StorageStatistics()
   {
     Type = 2,
     CbSize = num,
     GrfLocksSupported = 2,
     GrfMode = 2
   };
 }
Exemplo n.º 5
0
        public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
        {
            long length = sourceStream.Length;

            if (length == 0)
            {
                length = 0x7fffffff;
            }

            return(new StorageStatistics
            {
                Type = 2,              // IStream
                CbSize = length,
                GrfLocksSupported = 2, // exclusive
                GrfMode = 0x00000002,  // read-write
            });
        }
Exemplo n.º 6
0
 private static Result StatImpl(IntPtr thisPtr, ref StorageStatistics.__Native statisticsPtr, StorageStatisticsFlags flags)
 {
     try
     {
         var shadow     = ToShadow <ComStreamShadow>(thisPtr);
         var callback   = ((IStream)shadow.Callback);
         var statistics = callback.GetStatistics(flags);
         statistics.__MarshalTo(ref statisticsPtr);
     }
     catch (SharpGenException exception)
     {
         return(exception.ResultCode);
     }
     catch (Exception)
     {
         return(Result.Fail.Code);
     }
     return(Result.Ok);
 }
Exemplo n.º 7
0
 private static Result StatImpl(IntPtr thisPtr, ref StorageStatistics.__Native statisticsPtr, StorageStatisticsFlags flags)
 {
     try
     {
         var shadow = ToShadow<ComStreamShadow>(thisPtr);
         var callback = ((IStream)shadow.Callback);
         var statistics = callback.GetStatistics(flags);
         statistics.__MarshalTo(ref statisticsPtr);
     }
     catch (SharpDXException exception)
     {
         return exception.ResultCode;
     }
     catch (Exception)
     {
         return Result.Fail.Code;
     }
     return Result.Ok;
 }
Exemplo n.º 8
0
 private static Result StatImpl(IntPtr thisPtr, ref StorageStatistics.__Native statisticsPtr, StorageStatisticsFlags flags)
 {
     try
     {
         ((IStream)CppObjectShadow.ToShadow <ComStreamShadow>(thisPtr).Callback).GetStatistics(flags).__MarshalTo(ref statisticsPtr);
     }
     catch (SharpDXException ex)
     {
         return(ex.ResultCode);
     }
     catch (Exception ex)
     {
         return((Result)Result.Fail.Code);
     }
     return(Result.Ok);
 }
Exemplo n.º 9
0
        public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
        {
            long length = sourceStream.Length;
            if (length == 0)
                length = 0x7fffffff;

            return new StorageStatistics
                {
                    Type = 2, // IStream
                    CbSize = length,
                    GrfLocksSupported = 2, // exclusive
                    GrfMode = 0x00000002, // read-write
                };
        }
Exemplo n.º 10
0
 private static Result StatImpl(IntPtr thisPtr, ref StorageStatistics.__Native statisticsPtr, StorageStatisticsFlags flags)
 {
     try
     {
       ((IStream) CppObjectShadow.ToShadow<ComStreamShadow>(thisPtr).Callback).GetStatistics(flags).__MarshalTo(ref statisticsPtr);
     }
     catch (SharpDXException ex)
     {
       return ex.ResultCode;
     }
     catch (Exception ex)
     {
       return (Result) Result.Fail.Code;
     }
     return Result.Ok;
 }