[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: IStream Seek issue with Drag & Drop from TSVN repo browser

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 7 Apr 2017 17:13:54 +0200

On 06.04.2017 12:08, Leo Davidson wrote:
> Hi there,
>
> I think there is a bug in the TSVN repo browser (and maybe anything
> else that shares its drag & drop code).
>
> This happens with TSVN 1.9.5.27581 which detects as the latest
> version. I also checked the trunk changelog for related recent commits
> and didn't see any.
>
> One line summary:
>
> - The IDataObject that TSVN provides contains an IStream which begins
> positioned at the end of the data, rather than the start. So if the
> drop target tries to read out of the stream, it gets a zero byte
> result, as it is already at the end.

I could be wrong, but as I understand the documentation, it is actually
required to seek the stream to the end.

"When the transfer medium is a stream, OLE makes assumptions about where
the data is being returned and the position of the stream's seek
pointer. In a GetData call, the data returned is from stream position
zero through just before the current seek pointer of the stream (that
is, the position on exit)."

Also see here for details:
https://blogs.msdn.microsoft.com/oldnewthing/20140918-00/?p=44033/

So if that's right, then you don't have a workaround implemented but
fixed the problem on your side :)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3227487
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2017-04-07 17:14:23 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.