473,472 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Open associated application with filestream

J
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.

Any suggestions or ideas on work arounds would be appreciated!

Thanks,
James
Nov 16 '05 #1
1 2883

"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
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Otik | last post by:
Hi, I'm trying to open a file with read access only, e.g. FileStream fs = new FileStream("C:\foo.txt", FileMode.Open, FileAccess.Read); The file is open by another process and the FileStream...
0
by: Mark Phillips | last post by:
Hello, I am having a problem in which a file can get stuck open when a thread that is attempting to write to it gets aborted (ThreadAbortedException occurs). The log file gets stuck open until...
3
by: trellow | last post by:
Hello, I am writing an application that needs to read a file that is already open by another process for writing. When I do the following: FileStream fs = new FileStream(fileName,...
6
by: Tim Cowan | last post by:
Hi I have the following code to write an error file and it is supposed to open the HTML file in a browser when an error occurs. It creates the file Ok but doesn't open the new browser and doesn't...
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
1
by: ABCL | last post by:
Hi All, I am working on the situation where 2 different Process/Application(.net) tries to open file at the same time....Or one process is updating the file and another process tries to access...
6
by: Moumen VB.NET 2003/2005 Developer | last post by:
How can I detect if a file sitting on a network drive is still open by another application? This application resides on another machine on the network? I am using VB.NET 2003 Your help is...
6
by: =?Utf-8?B?TUNI?= | last post by:
I try to open a log file that is logging infomation by another process: StreamReader sr = File.OpenText(filePath); I got the exception message: The process cannot access the file...
0
sivisr
by: sivisr | last post by:
Hi Everybody, I need some help on web service.I want to open pdf file from database to my windows application using web service.Every thing was completed running correctly, but i could...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.