C++/VB - drag/drop files > 4G
Asked By David F.
01-Nov-09 11:43 AM
My existing drag / drop interface uses the various COM interfaces but they
use DWORD values for file positioning. What interface should I be using to
support files > 4G and what platforms does that interface work on?
Thanks.
SetSize
(1)
IStream
(1)
TeamB
(1)
FILEDESCRIPTOR
(1)
DWORD
(1)
Years
(1)
Pigs
(1)
COM
(1)
Igor Tandetnik replied to David F.
they
using to
I am not sure I understand. Which part of drag/drop deals with file sizes =
but cannot represent sizes greater than 4G? The only place I could think =
of off the top of my head where file size is mentioned is in =
FILEDESCRIPTOR structure, but it does use two DWORDs to represent size.
--=20
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not =
necessarily a good idea. It is hard to be sure where they are going to =
land, and it could be dangerous sitting under them as they fly overhead. =
-- RFC 1925
Remy Lebeau replied to Igor Tandetnik
Agreed. Also, when passing data around using IStream, its SetSize() and
Stat() methods also support 64-bit sizes as well.
--
Remy Lebeau (TeamB)
David F. replied to Igor Tandetnik
I am not sure I understand. Which part of drag/drop deals with file sizes but
cannot represent sizes greater than 4G? The only place I could think of off
the top of my head where file size is mentioned is in FILEDESCRIPTOR
structure, but it does use two DWORDs to represent size.
--
I do not know - I was just going from memory from 9 years ago, now I look at
what was there about 4G is commented out and using 64bit values. So perhaps
it was limited to some platform or using some other interface. Sorry about
that.

Does the C++ standard define the global function of " istream& operator > > (istream& in, string& str); "? C++ / VB > (istream&, in, , string&, str);, "?" / > Dear all, Maybe you know, I am a huge fan of C str; cin > > str; The code fragment above is very common. I think the global function " istream& operator > > (istream& in, string& str); " must be of course defined by the C++ standard. I looked up comp.lang.c++.moderated. First time posters: Do this! ] C++ Discussions Class (1) Global function istream (1) String str (1) Istream (1) N3090: / / 21.4.8.9: inserters and extractors template<class charT, class traits, class traits> && is, basic_string<charT, traits, Allocator> & str); string is a typdef of basic_string (21.3) istream is a typedef of basic_istream (27.3) - - [ See http: / / www.gotw.ca / resources / clcm.htm
Problem loading CImage / GDI+ Bitmap from an IStream C++ / VB I get an InvalidParameter result whenever I try instantiating a PNG image from an IStream. void SomeClass::LoadPNG(IStream * stream) { CImage image; image.Load(stream); } The load method tries instantiating a GdiPlus::Bitmap (from GdiplusBitmap.h) object which fails. inline Bitmap::Bitmap( IN IStream *stream, IN BOOL useEmbeddedColorManagement ) { GpBitmap *bitmap = NULL; if(useEmbeddedColorManagement) { lastResult = DllExports::GdipCreateBitmapFromStreamICM(stream, &bitmap); } else Is there a workaround? I have no choice but to save / load to / from an IStream. The save, incidently, works. Win32 GDI Discussions GdipCreateBitmapFromStreamICM (1) SHCreateStreamOnFile (1) GdipCreateBitmapFromStream (1) CClientDC (1 something wrong with the stream or the image. This little test worked fine for me: IStream *filestream = NULL; if (SUCCEEDED (SHCreateStreamOnFile(_T("E: \ Test.png"), STGM_READ, &filestream))) { CImage image; image.Load alright in Paint. Another post on this forum indicated that for PNG images only your IStream implementation also needed to implement the GDI+ IImageBytes interface for the load to be successful Salsbery Microsoft MVP - Visual C++ Yes it does. Obviously there is something wrong with my IStream implementation. The only possibly helpful thing I see in the docs is: methods." Mark - - Mark
Implementing IStream with ATL C++ / VB Hi folks, I'm trying to implement a version of IStream to support a shell extension thumbnail extractor (pre-Vista) using ATL, but I'm getting stumped. The idea is to include the custom IStream object implementation in the same dll server providing the extraction object. I've tried modifying a single .h file, so that the client COM object (the extractor) can create an IStream object using CoCreateInstance.This part at least compiles and links. The problem is, I can to use the static OpenFile call to set the file name and actually get the IStream object to open the file. I can't even figure out how to get the OpenFile call declared in the client object source - - if I try to include the custom IStream ATL .h file in the client object, the compiler starts griping about the IStream object's IUnknown functions being abstract, and I've run short of extern tricks. Can anyone suggest a way to actually get a file associated with the example IStream object when created via CoCreateInstance? (Note: I have to bypass something like SHCreateStreamOnFile in the