Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 30 Jan 2007 00:10:08 -0000,    group: microsoft.public.platformsdk.com_ole        back       


MIME handler   
Hi,

I need to write a mime handler for IE (initially to render PDF files my way rather than Adobe's) but cannot find any examples (in
C++).

Presumably I have to expose an IInternetProtocolSink.

I have VS6 and VS8 (probably have VS7 somewhere). Are there any wizard projects and objects I can use?

Thanks,

Jan
date: Tue, 30 Jan 2007 00:10:08 -0000   author:   Jan M

Re: MIME handler   
"Jan M"  wrote in message
news:ecc6BMARHHA.4276@TK2MSFTNGP02.phx.gbl
> I need to write a mime handler for IE (initially to render PDF files
> my way rather than Adobe's) but cannot find any examples (in C++).

KB article KB260840 "SAMPLE: MIMEfilt Demonstrates MIME Filter for 
Internet Explorer"
-- 
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
date: Tue, 30 Jan 2007 00:13:36 -0500   author:   Igor Tandetnik

Re: MIME handler   
Hi Igor,

As far as I can see MIMEfilt takes the data from the source and, having converted it, sends it to what I need to write - the MIME
handler that draws the page. I already have a Pluggable Protocol Handler the takes the data from the source and put it in an IE
cache file.

I found a MIME handler example - MIMEtype which is an ActiveX control in MFC. I really wanted to avoid both if I could.

Any other ideas for a COM object IE plugin?

Regards,

Jan

"Igor Tandetnik"  wrote in message news:OXUfh2CRHHA.3500@TK2MSFTNGP05.phx.gbl...
> "Jan M"  wrote in message
> news:ecc6BMARHHA.4276@TK2MSFTNGP02.phx.gbl
> > I need to write a mime handler for IE (initially to render PDF files
> > my way rather than Adobe's) but cannot find any examples (in C++).
>
> KB article KB260840 "SAMPLE: MIMEfilt Demonstrates MIME Filter for
> Internet Explorer"
> --
> 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
>
>
date: Tue, 30 Jan 2007 05:46:33 -0000   author:   Jan M

Re: MIME handler   
Jan M  wrote:
> As far as I can see MIMEfilt takes the data from the source and,
> having converted it, sends it to what I need to write - the MIME
> handler that draws the page. I already have a Pluggable Protocol
> Handler the takes the data from the source and put it in an IE cache
> file.
>
> I found a MIME handler example - MIMEtype which is an ActiveX control
> in MFC. I really wanted to avoid both if I could.
>
> Any other ideas for a COM object IE plugin?

You thoroughly lost me here. This passage makes no sense to me, sorry. I 
have absolutely no idea what you are trying to do.
-- 
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
date: Tue, 30 Jan 2007 10:35:46 -0500   author:   Igor Tandetnik

Re: MIME handler   
Hi Igor,

Sorry, you've lost me too :-). I'm not sure what you dont understand so I will reiterate. Forgive me if I am a little long winded.

The sample you suggested (MIMEfilt) does not show how to draw the page on the screen but simply illustrates how to deliver the
content to the MIME handler (which does the drawing). I need an example of a MIME *handler* (aka "default MIME type player") not a
MIME *filter*, i.e. what a MIME filter delivers the content to." (I already have a sort of MIME filter in the form of a Pluggable
Protocol Handler so know how to do that bit).

I found an example of a MIME handler - MIMEtype (http://support.microsoft.com/kb/165072), but it is MFC and uses OLE rather than
COM.

I guess I cannot avoid an "ActiveX control" in MS Windows as a MIME handler. Perhaps my reference to wanting to misled you. I really
wished to avoid MFC and OLE.

I wanted either an example of a MIME handler using COM or a hint which wizard I should use to create a COM project that handles the
other side of the IInternetProtocol interface, i.e. is on the (eventual) receiving end of the Read(void *pv,ULONG cb,ULONG *pcbRead)
that a MIME filter handles to deliver the content to URLMON (which passes it on to the MIME handler to draw).

Regards,

Jan

"Igor Tandetnik"  wrote in message news:OqnHaRIRHHA.2252@TK2MSFTNGP02.phx.gbl...
> Jan M  wrote:
> > As far as I can see MIMEfilt takes the data from the source and,
> > having converted it, sends it to what I need to write - the MIME
> > handler that draws the page. I already have a Pluggable Protocol
> > Handler the takes the data from the source and put it in an IE cache
> > file.
> >
> > I found a MIME handler example - MIMEtype which is an ActiveX control
> > in MFC. I really wanted to avoid both if I could.
> >
> > Any other ideas for a COM object IE plugin?
>
> You thoroughly lost me here. This passage makes no sense to me, sorry. I
> have absolutely no idea what you are trying to do.
> --
> 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
>
>
date: Tue, 30 Jan 2007 20:40:29 -0000   author:   Jan M

Re: MIME handler   
Jan M  wrote:
> The sample you suggested (MIMEfilt) does not show how to draw the
> page on the screen but simply illustrates how to deliver the content
> to the MIME handler (which does the drawing).

Got it. You want a MIME player, not a MIME filter. See

KB165072 "MimeType.exe makes ActiveX object default MIME type player"
KB223500 "SAMPLE: Ziprdr.exe: ZipReader ActiveX Control MIME Viewer Uses 
Byte Ranges"

-- 
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
date: Tue, 30 Jan 2007 15:56:58 -0500   author:   Igor Tandetnik

Re: MIME handler   
> Got it.

Nearly.

> You want a MIME player, not a MIME filter.

Well, I originally said "MIME handler" - MS's own term (until it recently changed to MIME player).

> See
> KB165072 "MimeType.exe makes ActiveX object default MIME type player"

As I said - already got it. But it's OLE.

> KB223500 "SAMPLE: Ziprdr.exe: ZipReader ActiveX Control MIME Viewer

Still MFC and OLE. Guess there isnt anything handy in ATL/WTL plus COM.

So COM really is dead?

Very many thanks anyway.

Regards,

Jan
date: Tue, 30 Jan 2007 21:46:07 -0000   author:   Jan M

Re: MIME handler   
Jan M  wrote:
>> See
>> KB165072 "MimeType.exe makes ActiveX object default MIME type player"
>
> As I said - already got it. But it's OLE.
>
>> KB223500 "SAMPLE: Ziprdr.exe: ZipReader ActiveX Control MIME Viewer
>
> Still MFC and OLE. Guess there isnt anything handy in ATL/WTL plus
> COM.
>
> So COM really is dead?

I don't understand the fine distinction you make between COM and OLE. 
OLE is built on top of COM. An ActiveX control is an OLE object.

There are lots of tutorials on writing ActiveX controls with ATL. These 
two samples should show you how to register an ActiveX control as a MIME 
player for a particular MIME type. I don't know of any single sample 
that does everything you want in one neat package (which doesn't mean it 
doesn't exist - Google is your friend). You should understand the issues 
involved, and combine pieces from documentation and existing samples to 
arrive at the final solution. This process is called "software 
engineering".
-- 
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
date: Tue, 30 Jan 2007 18:11:13 -0500   author:   Igor Tandetnik

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us