Link to home
Start Free TrialLog in
Avatar of kreid1960
kreid1960

asked on

VB6 open excel/word/adobe with Byte Array

I will be receiving a binary blob of data from a UNIX process.  The blob will tell me what kind of data it is, excel, word, pdf...  I need to display the file, whatever kind it is, without writing the data to disk.  There are security issues with actually writing the file.  How can I open these files with a byte array rather than an actual file?
ASKER CERTIFIED SOLUTION
Avatar of Frosty555
Frosty555
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could conceivably create a ramdisk, assign it a drive letter, and save your file in there. This effectively creates a temp location for you to write data to that isn't part of the rest of the system, and gets wiped out as soon as you reboot.

You can't do that directly from VB, though. Rather you have to install the ramdrive.sys driver and setup a ramdisk that way. Then you can access it as a drive letter just like you'd access anything else.

This is what Microsoft calls a "sample driver", and, as they say, "Neither the driver nor the sample programs are intended for use in a production environment". Also I have no idea if this will work on Vista. It only is advertised to work on 2000/XP.

http://www.codeguru.com/cpp/w-p/system/devicedriverdevelopment/article.php/c5789
Avatar of kreid1960
kreid1960

ASKER

Thanks for your help!