"J" <pa********@cwpope.com.au> wrote in message
news:41***********************@ken-reader.news.telstra.net...
Hi,
I know that to launch an application that is associated with a particular
file I can use Process.Start(filename), but that assumes the file
physically
exists somewhere. My problem is I already have the contents of the file
in
memory (read from a DB) and it seems a bit redundant to write the data to
a
temp file just so Process.Start can re-read the info back into memory and
launch.
Process.Start is not going to read the file into memory. It's just going to
pass the filename to the target application. It's up to the target
application what to do then. For instance the target application could
write to the file, or delete it, or ignore it.
And assuming that the file is read into memory, it's done in a seperate
process with a seperate address space. So you really need to write it to a
file.
If the file is large, you needn't load it into memory in the first place.
Just write it to a temp file as you read it from the DB.
David