Exe cannot read bufferedstream from http port.

D

ds

Launch an exe from Servlet based on mime-type.

Hi,
I launch a windows based program to handle a custom-defined mime
type. Eg: my mime-type = .opti. When a servlet posts a buffered
stream along with correctly set header

response.SetHeader("Content-disposition", "attachment; filename=" +
"Example.opti" );

.... I am able to launch "myprog.exe". (I have already made this
association with OS)

I can get the filepath where the buffered stream is supposed to be
stored by GetCommandLine(), but when I try to read this file, it
returns null ptr. This (Example.opti) is a temporary internet file and
I dont know how to read this. I am not able to get any data associated
with this stream. Is there any MFC API that would do this for me?
Thank you,
D.
 
M

Mike Wahler

ds said:
Launch an exe from Servlet based on mime-type.

Hi,
I launch a windows based program to handle a custom-defined mime
type. Eg: my mime-type = .opti. When a servlet posts a buffered
stream along with correctly set header

response.SetHeader("Content-disposition", "attachment; filename=" +
"Example.opti" );

... I am able to launch "myprog.exe". (I have already made this
association with OS)

I can get the filepath where the buffered stream is supposed to be
stored by GetCommandLine(), but when I try to read this file, it
returns null ptr. This (Example.opti) is a temporary internet file and
I dont know how to read this. I am not able to get any data associated
with this stream. Is there any MFC API that would do this for me?

I don't see a single question about C++ in your message.
Before posting here again, please see:
http://www.slack.net/~shiva/welcome.txt
Thank you.

MFC questions should be directed to newsgroup:
microsoft.public.vc.mfc

You may also find Microsoft's developer resource site to
be useful: www.msdn.microsoft.com

If your news server does not have it, you can connect
to Microsoft's public news server at msnews.microsoft.com

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top