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; }
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); }
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 }; }
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 }; }
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 }); }
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); }
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; }
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); }
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 }; }
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; }