Skip to content

Commit

Permalink
BREAKING CHANGE: Changed parameters of Ole32.IStreamV.Seek and CopyTo…
Browse files Browse the repository at this point in the history
… methods to use `out` parameters. Cost of throwing away value was determined to be zero.
  • Loading branch information
dahall committed Jan 14, 2023
1 parent 94703f0 commit 8cabbdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PInvoke/Ole/Ole32/ObjIdlBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2267,7 +2267,7 @@ public interface IMarshalingStream : IStreamV
// https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-seek HRESULT Seek( LARGE_INTEGER dlibMove, DWORD
// dwOrigin, ULARGE_INTEGER *plibNewPosition );
[PreserveSig]
new HRESULT Seek(long dlibMove, STREAM_SEEK dwOrigin, IntPtr plibNewPosition);
new HRESULT Seek(long dlibMove, STREAM_SEEK dwOrigin, out ulong plibNewPosition);

/// <summary>The <c>SetSize</c> method changes the size of the stream object.</summary>
/// <param name="libNewSize">Specifies the new size, in bytes, of the stream.</param>
Expand Down Expand Up @@ -2326,7 +2326,7 @@ public interface IMarshalingStream : IStreamV
// https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-copyto HRESULT CopyTo( IStream *pstm,
// ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten );
[PreserveSig]
new HRESULT CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
new HRESULT CopyTo(IStream pstm, long cb, out ulong pcbRead, out ulong pcbWritten);

/// <summary>
/// The <c>Commit</c> method ensures that any changes made to a stream object open in transacted mode are reflected in the
Expand Down Expand Up @@ -3371,7 +3371,7 @@ public interface IStreamV : ISequentialStream
// https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-seek HRESULT Seek( LARGE_INTEGER dlibMove, DWORD
// dwOrigin, ULARGE_INTEGER *plibNewPosition );
[PreserveSig]
HRESULT Seek(long dlibMove, STREAM_SEEK dwOrigin, IntPtr plibNewPosition);
HRESULT Seek(long dlibMove, STREAM_SEEK dwOrigin, out ulong plibNewPosition);

/// <summary>The <c>SetSize</c> method changes the size of the stream object.</summary>
/// <param name="libNewSize">Specifies the new size, in bytes, of the stream.</param>
Expand Down Expand Up @@ -3430,7 +3430,7 @@ public interface IStreamV : ISequentialStream
// https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-copyto HRESULT CopyTo( IStream *pstm,
// ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten );
[PreserveSig]
HRESULT CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
HRESULT CopyTo(IStream pstm, long cb, out ulong pcbRead, out ulong pcbWritten);

/// <summary>
/// The <c>Commit</c> method ensures that any changes made to a stream object open in transacted mode are reflected in the
Expand Down

0 comments on commit 8cabbdb

Please sign in to comment.