core4096
core4096

Reputation: 111

Delphi - open file from MemoryStream with associated program

Is there any way to open file from MemoryStream with app associated to its extension? Or I must save the file from stream to temporary folder and run it with ShellExecute?

Upvotes: 2

Views: 964

Answers (1)

David Heffernan
David Heffernan

Reputation: 612794

Is there any way to open file from MemoryStream with app associated to its extension?

No.

Or I must save the file from stream to temporary folder and run it with ShellExecute?

Yes.

Processes have isolated memory space. An external process can't read your process memory.

Well, two processes can share memory with a memory mapped file. But that requires both process to agree on the protocol to share that memory. You'd need to have complete control over both processes, which I suspect you do not.

Upvotes: 3

Related Questions