Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maybe a strange question...

Status
Not open for further replies.
Jul 29, 2005
136
0
0
PT
Hi,

If I have a component with a property to each I need to pass a path to a text file, is it possible to send it something in memory that would be well interpreted as a file? Or that depends of the way the property was done?

I ask this because I don´t want to save a file on this. I would like to work with a filed built in memory.

Thank you
 
You could pass it a stream (bytes), but I'm not sure that is that what you want.

Christiaan Baes
Belgium

"My new site" - Me
 
You can have the file as embedded resource. Then use a stream, as Chris said, ..
 
olisemalis,

You probably need Object Serialization. Look at FileStream and BinaryFormatter objects. They go hand in hand for this case. Or FileStream and SoapFormatter objects. The difference is that the latter produces human readable output.

vladk
 
Or use Win32 APIs to create a memory-mapped file.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Can someone please explain in further detail what olisemalis is trying to do? This sounds alot like a situation that I came across in the past but could not find a work-able solution.

Thanks!

-lucyv
 
Hi Lucyv,

I need to use a component that accepts a string path to a file. If think the component doesn´t accept the data on the file but the file itself. So I need to create a file and giv the component the url. To create a file on disk its time consuming. The goal is to create a file in another whay...if it is possible...

Thank you
 
Thanks olisemalis. I think our situations are pretty similiar. Please let me know if you get this to work.

-lucyv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top