Manfred561180

I have defined my own file format and created an exe that can display the contents with its own ui elements. I have defined my file extension (lets use *.abcde for this thread).

When such a file is given as program argument to my exe, it will display the file. I have also found some registry entries in HKCR (...shell..open..ddeexec) so that I can doubleclick such a file in explorer and it gets displayed with my exe.

Now I want these files to be displayable in IE in a way similar to what is done for e.g. word documents, i.e. embedded in the page or the frame, whenever an url ending in *.abcde is used as target of a link, or src of a frame, typed in the address field.

Could you please help me find out all the interfaces I need to implement, and registry entries, other things which are necessary for this to work.

My exe is written in Visual basic (VB6) so it would be great if the solution was possible with this version (hopefully you don't think it too oldfashioned). But then if you could give me a working example in another programming language I could consider porting.

Looking through the documentation I stumbled over ActiveX Documents which looked very promising, I can define the UI of the "document" in very standard way, but then this path was no success since it turned out that the file extension had to be *.VBD, and what's worse, the file content is some binary stuff needed for the vb runtime, it cannot be my file content. So unless I missed something fundamental this is not a solution.

I found lot's of discussions/sample code about the reverse problem, namely embed an office document in another application (thus writing a document container), but didn't find anything useful about my problem, i.e. how to shape my exe so it can be embedded in a standard document container like Internet Explorer.

Thanks for any help

Manfred



Re: Internet Explorer Extension Development show my document with my exe embedded in browser

IECUSTOMIZER

Hi Manfred,

Firstly you have to discern the difference between an Internet Link (uses the protocol handler for http, https, mailto) and a file link.

Internet links will first prompt to download the remote *abcde file to the download folder of the client and then use the default 'opener' for that file type to open(or run or edit, ... it depends on what is the default action for that file type) the file.

If you want to always open files of that type in a browser window (a html document or a html document hosting an ActiveX control that will handle your custom file type), you have to design your file type handler to create an instance of the browser and then to write a document that will either display information about your custom file type, or a custom Active X control that will render the contents of your custom file type in the browser window.

Regards.






Re: Internet Explorer Extension Development show my document with my exe embedded in browser

IECUSTOMIZER

Hi Again,

An afterthought. You can rename a vbd to whatever extension you want, then just copy the file extension handler under the HKCR key for *.vbd to a key with your new file type extension. I think from memory that vbd documents use shwdocvw.dll as the InProcessSvr32 value.

VBD is no longer supported in IE7, and although you may rename the extension to a new extension for a new filetype, IE will determine its real file type from its binary contents (see the first 3 bytes of the file) and fail to either download it or host it in the browser.

Regards.






Re: Internet Explorer Extension Development show my document with my exe embedded in browser

Roey

hi IECUSTOMIZER
so how exactly it is possible to write such activeX using C#

thanks
Roey