1

I have to load the tar file contents in a buffer (by creating a stream) and then i have to store the file of my interest in the buffer (i suppose that there are number of files and there is one .html file which i am interested in storing inside the buffer) and i have thought of storing only the contents of this particular .html file in the buffer.

and then after storing only the contents of that .html file in buffer i will display that buffer which will show me the html file (which is exactly the same .html file which we will get on uncompressing that tar file in which that .html file is stored.)

Now is there any mechnaism exist to know that .html file exists at this particular location so that i will set my biffer at that particular index and will store the full .html file only.

  • 1
    what problem are you trying to solve using this approach? – Pradheep Jul 19 '13 at 18:18
  • Actually i have created my own preview handler in visual c++ for any file of any software (which has .ame extension) which is actually a tar file and inside that i have .html file and i want to click on the .ame file in window explorer and upon that click i should bring html file contents at preview pane. (just as we get in the case of .pdf file in preview pane) so i have thought oh storing the .html contents in the buffer when the stream gets generated upon clicking. Do you have any idea ?? have you understood what i want to do ?? –  Jul 19 '13 at 18:25

1 Answers1

0

It sounds like your trying achieve the same effect as this question:
Coerce Windows to show a thumbnail for my custom file type

And here is a direct link on how to do it (with examples in c++):
http://msdn.microsoft.com/en-us/library/cc144067%28VS.85%29.aspx

Community
  • 1
  • 1
tamato
  • 838
  • 7
  • 15
  • the second link task is already implemented by me i already have preview handler which display a .png file inside the tar file (just as thumbnails) but before i knew that .png file is the first file coming in the stream on clicking the tar file so i didn't need to know about the location of .png file (because its the fact that if we have a .png file inside the tar file with many other files then .png file will go first in the stream) i just wanted to know if any one has this type of information about .html file that it comes in the stream at which number(as .png file if present will be first) –  Jul 19 '13 at 19:06
  • @ShekharSinghSHEKHWAT Then is your question how to render the html into an image to display it? If it is check out: http://stackoverflow.com/questions/9398650/use-a-html-renderer-in-an-embedded-environment – tamato Jul 31 '13 at 03:45
  • the question was to get the contents of any particular file in present in .tar file and the solution is done here (you can see and give votes if you want)http://stackoverflow.com/questions/17920081/how-to-skip-a-file-inside-the-tar-file-to-get-a-particular-file/17928714#17928714 now we have the contents of .html file in a buffer and from that buffer we created a stream and using that stream i want to display html file in preview pane (I don't know how to do that.Do you know ??) but i guess we have to create a style sheet (just like a xml preview on preview pane) –  Jul 31 '13 at 18:05
  • if you want o know more about how to do the same for xml file you can see here http://stackoverflow.com/questions/17909747/how-to-create-style-sheet-for-html-preview-handler we have to do similar type of thing for html file to create preview in preview pane (and if you want you can vote the question so as to make the question attractive for other software developers that may create them interest to this question) –  Jul 31 '13 at 18:07