> >Hi, I'm in the same boat.  I have a Firefox extension that allows a user
to
> >right-click on an image and send the image to an external application
> >(paint, etc).  Thing is, I can't figure out how to extract the image out
of
> >the cache.  Ideally, I want the extension to just send the original URL
and
> >have my win32 app extract the image from the cache itself.  Barring that,
if
> >I could somehow extract the image myself (in firefox) and pass the local
> >path to the win32 app, it would work nicely too.  I hope I explained this
> >clearly.
> >
> >Any ideas?
> >
> >Thanks,
> >Mike.
>
> Perhaps you should use nsIDownloader.  It gives you a nsIFile
> referencing the downloaded file.  If the file lives in the cache, then
> you will get a pointer to the file in the cache (no extra work).  If the
> file is in the cache, but not stored as a separate file (i.e., as a
> sequence of blocks in one of the _CACHE_00X_ files), then nsIDownloader
> will copy the file out of the cache and give you a reference to a
> temporary file on disk.  Otherwise, it will go ahead and download the
> file to a temporary location and give you a reference to that file.
>
> You use it in conjunction with nsIChannel.  nsIDownloader is actually
> just a subclass of nsIStreamListener, so once you configure your
> nsIDownloader instance, you can pass it to nsIChannel::asyncOpen.
> You'll want to configure a nsIChannel for your URL just as you would if
> you were loading the URL normally.
>
>
http://lxr.mozilla.org/mozilla/source/netwerk/base/public/nsIDownloader.idl
>
> See nsJARChannel.cpp for an example of nsIDownloader being used
> internally by Mozilla.
>
> -Darin

Thanks for the quick reply.

I looked at the idl, and it seems to be what I need.  However, I have no
idea how to actually *call* the function from outside of Firefox.

I see "[scriptable, uuid(44b3153e-a54e-4077-a527-b0325e40924e)]" but
honestly, I'm not sure what that tells me.  I'm a straight "C" guy, and
recently have been doing .NET develpment..  In other words, I have no idea
what I'm looking at here.  Can I call it from a DLL?  ActiveX?

I looked all over Mozilla's site, but no dice.  I just need to know how to
actually put this to work.  C++ is no good, since I'll be ultimately calling
this function from VB.

Thanks,
Mike.


_______________________________________________
Mozilla-netlib mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to