473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Passing a memory stream to Process object?


Hi Everyone ...

I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a document
and have it open in Word or Acrobat without my first writing it to disk

And I'm lost on next steps here ... anyone got a suggestion?

TIA
mj

Aug 19 '08 #1
3 3655
On Mon, 18 Aug 2008 19:41:48 -0700, Maura Jenkins <mj@nospam.comwrote:
Hi Everyone ...

I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a
document
and have it open in Word or Acrobat without my first writing it to disk

And I'm lost on next steps here ... anyone got a suggestion?
If I understand your question correctly, then no...the OS just isn't built
that way. Short of hacking the application, you can't just inject data
into it like that. The application would have to be written specifically
to support that sort of operation. Word, and I'm pretty sure Acrobat
(Reader or full version), simply does not at all, and certainly not in a
way that would be supported through the Process object (which can only
redirect the standard input and output streams for a given process).

Pete
Aug 19 '08 #2
*some* apps might let you use a named pipe to do this, but to be
honest the amount of hacking and debugging just isn't worth it (since
the client may assume seekable etc) - save it to the tmp area are load
it from there...

As another possible alternative, you might be able to set up an
HttpListener to act as a web-server, and send the process a local http
address (which you then respond to with your data) - but again, saving
it as a local file is just the simplest (and least brittle) answer.

Marc
Aug 19 '08 #3
Maura Jenkins wrote:
I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a document
and have it open in Word or Acrobat without my first writing it to disk
For most practical purposes: no.

If you really want to then make you app act as a file server
and serve the in memory structure as a file and let the app
read from the "network" drive/share.

Arne
Aug 20 '08 #4

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

Similar topics

58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
6
by: Ian Robertson | last post by:
I am trying to write a function that takes a reference to an object as its arguement. The object is created in another function and I am trying to pass the object to another function from within...
6
by: Arghknork | last post by:
Heres a dumb one. I know you can't actually pass reference types by value in C#, but I want to pass an object into a method and allow that method to manipulate a copy of that object, such that the...
5
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. ...
0
by: Steve | last post by:
I am using an XMLSerializer to create an xml object of a class in a web application. I am then using an XMLWriter to place this into a memory stream. No problems so far. I have a web service...
11
by: John Pass | last post by:
Hi, In the attached example, I do understand that the references are not changed if an array is passed by Val. What I do not understand is the result of line 99 (If one can find this by line...
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
2
by: a_agaga | last post by:
Do you know are there some reasons why many do not make processes to communicate through memory? Why network connections (sockets) are used so commonly in IPC (inter process communication)...
0
by: phreak008 | last post by:
I'm using SendMessage(...) to send a message to all other process that might run. It works well. My problem is when I try to pass data using shared memory. Here is my code. In the 1st process, I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.