Is there an equivalent of ShellExecute or ShellExecuteEx that will take an array of bite as input argument? Windows API or .Net function will do.

I'm actually writing the array of bite to a temp folder and using ShellExecute to display the file. It works fine but it creates a security breach as the user can close the application before he or she closes the opened file in which case it stays written to the temp file. I have a few solutions in mind to do the cleanup but the best solution would be to have the equivalent of ShellExecute or ShelIExecuteEx that will take an array of bites as an input argument. It could be a Windows API or a .Net function. Any idea?
mmarin1mAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Frosty555Commented:
If you are worried about your file being left behind, simply specify the DeleteOnClose operand in the FileOptions property when you create your filestream. Then the operating system should delete the file once everyone closes it, and you shouldn't have to worry about the file being left behind.

There's an example here, albeit a little convoluted since it's got a lot of overloaded functions:

http://dotnet.org.za/markn/archive/2006/04/15/51594.aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mmarin1mAuthor Commented:
We decided to log the open files and delete the files at application shutdown and startup since the DeleteOnClose was not 100% secure especially during system crash.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.