EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Virtual File Contents

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#17069
Posted: 07/18/2011 13:57:30
by Miguel Galindo (Basic support level)
Joined: 07/18/2011
Posts: 1

I am evaluating Calback file system and I am trying to see if it will fit our needs, so forgive me if what I ask seems too trivial.
I am using Delphi 7.
Taking one of the supplied examples, VMounter, I want to add one more piece.
When the user copies a PDF file in to the Virtual folder I need to get the file and save it in my database.
I am putting my code in the OnCreateFile event

My question is: How do I grab the virtual file contents and put it into a TMemoryStream so I can save the stream to my database.


Thanks in Advance for your help

Miguel
#17071
Posted: 07/18/2011 15:57:35
by Eugene Mayevski (EldoS Corp.)

In general, you respond to file requests (passed via events). And you respond by reading or writing the requested amount of data from/to the storage.

VMounter sample does work with memory streams so you can take it as a guide. The question of *when* to save the data to the remote storage (either when the file is closed or flush the data when they are written or after some inactivity period) is up to you -- this is developer's part of work.


Sincerely yours
Eugene Mayevski
#17072
Posted: 07/18/2011 16:35:53
by Eric Dahlvang (Standard support level)
Joined: 09/11/2009
Posts: 29

Quote
My question is: How do I grab the virtual file contents and put it into a TMemoryStream so I can save the stream to my database.


The file contents will be passed to your implementation of OnWriteFile as the calling process writes bytes to the virtual disk.

Reply

Statistics

Topic viewed 890 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!