Creating a virtual file path from a stream

I have a general question regarding C # and the Windows API:

My task is to download the file from the document management system (DMS) and create an array of bytes from this file. From the DMS developer, I got a dll that provides this method:

loadFile(int DocId, string PathToSaveFile);

Unfortunately, this dll does not provide me with a way to deliver the requested file as a byte array or any stream. Now, to my question, is it possible with C # to create some kind of virtual path that does not actually exist on the secondary storage. Instead, are all the bits and bytes written to this path sent to me in the stream? The goal of my intention is to increase productivity, since I do not need to write data to the hard drive.

Iโ€™ve searched many times, but I donโ€™t really know the keywords that I need to search. Maybe someone can give me a hint or just tell me that this is not possible at all.

+5
source share
1 answer

This will depend on how the library opens the file and reads the file. If it uses CreateFile , then there is potential that you could provide through a named pipe. The path to the named pipe can be specified with \\.\pipe\PipeNameHere. In C #, you can use NamedPipeServerStream .

, , , , RAM-, . RAM . , .

+2

All Articles