Memory mapped files
-
Hi, I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it. Any help would be greatly appreciated, thanks in advance
-
Hi, I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it. Any help would be greatly appreciated, thanks in advance
In fact, you are not downloading a file, but its contents. Now, let's say you have all the bytes in your
byte[]
. What do you mean by "opening", "mapping to memory"? You already have it in memory. If you want the string represention, try theSystem.Text.Encoding.GetString(byte[])
method. -------- "I say no to drugs, but they don't listen." - Marilyn Manson -
Hi, I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it. Any help would be greatly appreciated, thanks in advance
[Message Deleted]
-
Ok sorry I didnt explain myself very clearly: What I want to do is to start a process over the file I got in a byte[] format, as if was doing the following: System.Diagnostics.Process.Start(myFile); but instead of pointing to a physical file, I want to 'open' it from memory.
-
Hi, I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it. Any help would be greatly appreciated, thanks in advance
This is not possible unless you write some shell extension that can "launch" in-memory file bytes (it would do this probably by writing the in-memory bytes to disk behind the scenes).
-
Ok sorry I didnt explain myself very clearly: What I want to do is to start a process over the file I got in a byte[] format, as if was doing the following: System.Diagnostics.Process.Start(myFile); but instead of pointing to a physical file, I want to 'open' it from memory.
You cannot do that, because a file name is required, which tells the shell which application to start. -------- "I say no to drugs, but they don't listen." - Marilyn Manson
-
This is not possible unless you write some shell extension that can "launch" in-memory file bytes (it would do this probably by writing the in-memory bytes to disk behind the scenes).