Index: src/platform/uOleDragDrop.pas
===================================================================
--- src/platform/uOleDragDrop.pas	(revision 7570)
+++ src/platform/uOleDragDrop.pas	(working copy)
@@ -998,12 +998,12 @@
   tIID : PGuid;
   hFile: THandle;
   pvStrm: IStream;
+  pvStrmStatStg: TStatStg;
   dwSize:     LongInt;
   AnyPointer: PAnsiChar;
   InnerFilename: String;
   StgDocFile: WideString;
   msStream:   TMemoryStream;
-  i64Size, i64Move: {$IF FPC_FULLVERSION < 030002}Int64{$ELSE}QWord{$ENDIF};
 begin
   result:=FALSE;
   InnerFilename:= ExtractFilepath(WantedFilename) + TEMPFILENAME;
@@ -1045,16 +1045,14 @@
     begin
       pvStrm:=IStream(Medium.pstm);
       // Figure out how large the data is
-      if (pvStrm.Seek(0, STREAM_SEEK_END, i64Size) = S_OK) then
+      if (pvStrm.Stat(pvStrmStatStg, STATFLAG_NONAME) = S_OK) then
       begin
-        // Seek back to start of stream
-        pvStrm.Seek(0, STREAM_SEEK_SET, i64Move);
         // Create memory stream to convert to
         msStream:=TMemoryStream.Create;
         // Allocate size
-        msStream.Size:=i64Size;
+        msStream.Size:=pvStrmStatStg.cbSize;
         // Read from the IStream into the memory for the TMemoryStream
-        if pvStrm.Read(msStream.Memory, i64Size, @dwSize)=S_OK then
+        if pvStrm.Read(msStream.Memory, pvStrmStatStg.cbSize, @dwSize)=S_OK then
           msStream.Size:=dwSize
         else
           msStream.Size:=0;
