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?
Visual Basic Classic

Avatar of undefined
Last Comment
kreid1960

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Frosty555

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Frosty555

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
kreid1960

ASKER
Thanks for your help!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes