public unsafe override long Seek(long offset, SeekOrigin origin) { ulong newPosition = 0; comStream.Seek(offset, origin, &newPosition); return((long)newPosition); }
private static int Seek(IntPtr thisPtr, long dlibMove, SeekOrigin dwOrigin, ulong *plibNewPosition) { try { Interop.Ole32.IStream instance = ComInterfaceDispatch.GetInstance <Interop.Ole32.IStream>((ComInterfaceDispatch *)thisPtr); instance.Seek(dlibMove, dwOrigin, plibNewPosition); return(S_OK); } catch (Exception ex) { Debug.WriteLine(ex); return(ex.HResult); } }