EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Clean the CBFS FileHandleContext.Target

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#21773
Posted: 10/01/2012 05:47:50
by ttran Tran (Priority Standard support level)
Joined: 08/20/2012
Posts: 35

Hello,
I put a file structure in the CBFS, and , for example in callback CbFsCloseFile()
I can get this structure out like this:

RSEntry myEntry = (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target;

and myEntry is also a part of a folder data structure, which is handdled outside of CBFS.

OK, by a specific reason, I would like to remove this myEntry out of the folder data structure. However, (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target still points to it. How can I make the (RSEntry)GCHandle.FromIntPtr(FileHandleContext).Target not to point to myEntry anymore (by a command outside of CBFS) ? so that myEntry can COMPLETELY disappear by Garbage Collector.
Or are there another suggestion in this case ?


Thanks
Tran
#21775
Posted: 10/01/2012 06:38:34
by Vladimir Cherniga (EldoS Corp.)

Hello,
if you talk about CbFs version 3 then use FileInfo.SetHandleContext(NULL)
#21989
Posted: 10/15/2012 02:40:09
by Vladimir Cherniga (EldoS Corp.)

This is no need in CBFS4.

Reply

Statistics

Topic viewed 720 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!