views:

227

answers:

1

Hi

I am getting the contents of a file in an IStream object. I want to be able to open the IStream contents in a Windows program based on the extension of the file (I know the extension and the mime types) from a dll where I am getting this object.

Can someone please tell me how to go about with this.

Thanks.

+1  A: 

Since you know the extension of the file, you should probably create a temporary file with that name and use ShellExecute to get the associated program to open it. There is no standard way in windows to get a program to do anything with a stream as it stands.

1800 INFORMATION