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); }
internal void __MarshalTo(ref StorageStatistics.__Native @ref) { @ref.PwcsName = this.PwcsName == null ? IntPtr.Zero : Utilities.StringToHGlobalUni(this.PwcsName); @ref.Type = this.Type; @ref.CbSize = this.CbSize; @ref.Mtime = this.Mtime; @ref.Ctime = this.Ctime; @ref.Atime = this.Atime; @ref.GrfMode = this.GrfMode; @ref.GrfLocksSupported = this.GrfLocksSupported; @ref.Clsid = this.Clsid; @ref.GrfStateBits = this.GrfStateBits; @ref.Reserved = this.Reserved; }
internal void __MarshalFrom(ref StorageStatistics.__Native @ref) { this.PwcsName = @ref.PwcsName == IntPtr.Zero ? (string)null : Marshal.PtrToStringUni(@ref.PwcsName); this.Type = @ref.Type; this.CbSize = @ref.CbSize; this.Mtime = @ref.Mtime; this.Ctime = @ref.Ctime; this.Atime = @ref.Atime; this.GrfMode = @ref.GrfMode; this.GrfLocksSupported = @ref.GrfLocksSupported; this.Clsid = @ref.Clsid; this.GrfStateBits = @ref.GrfStateBits; this.Reserved = @ref.Reserved; }
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); }
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); }
internal void __MarshalFree(ref StorageStatistics.__Native @ref) { @ref.__MarshalFree(); }