Memory mapped files in office

Add-in Express™ Support Service
That's what is more important than anything else

Memory mapped files in office
Open a memory mapped file 
Rob Blackin




Posts: 64
Joined: 2016-02-20
We are storing an office (word,excel,ppt) document in a db and want to open it in office without writing the file to the drive so it cannot be accessed by the person on the machine via the file system.

Our thought was to use memory mapped files and Create one and open that but seems we cannot get that working and do not see much documentation out there about it.

Do you know if this is possible or even if we need to write to disk first we would need it locked and not copyable while open.

Thanks,

Rob
Posted 19 Feb, 2018 16:01:35 Top
Andrei Smolin


Add-in Express team


Posts: 14803
Joined: 2006-05-11
Hello Rob,

Office doesn't provide any support for memory-mapped files. I would probably look at creating a hard drive in memory.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2018 04:23:40 Top
Rob Blackin




Posts: 64
Joined: 2016-02-20
HI,

Yes that is something we discussed. However, a user can still access that directly and get the temp file. Unless you know way to lock it down to a process or lock it so it can only be opened by the plugin.

We are also considering adding a password to the temp file so they cannot open it. However, when it is open, they can change it. I dont see any event that the password changed. THought is on close check if there is a password set.

thanks,

Rob
Posted 20 Feb, 2018 09:17:23 Top
Andrei Smolin


Add-in Express team


Posts: 14803
Joined: 2006-05-11
Rob,

I don't understand how you are going to use the document that you need to open. If you don't need to let the user look into it, you can open some file in a private format, not a document.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2018 10:02:47 Top