Microsoft.Samples.VisualStudio.SourceControlIntegration.SccProvider.DataStreamFromComStream.Seek C# (CSharp) Method

Seek() public method

Changes the seek pointer to a new location relative to the current seek pointer or the beginning or end of the stream.
public Seek ( long offset, SeekOrigin origin ) : long
offset long Displacement to be added to the location indicated by origin.
origin SeekOrigin Specifies the origin for the displacement.
return long
        public override long Seek(long offset, SeekOrigin origin)
        {
            LARGE_INTEGER l = new LARGE_INTEGER();
            ULARGE_INTEGER[] ul = new ULARGE_INTEGER[1];
            ul[0] = new ULARGE_INTEGER();
            l.QuadPart = offset;
            comStream.Seek(l, (uint)origin, ul);
            return (long)ul[0].QuadPart;
        }