EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Using OnReparseWithTag

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.
#36680
Posted: 05/09/2016 16:35:06
by Humberto Aicardi (Basic support level)
Joined: 04/16/2015
Posts: 5

Hi,

I'm currently doing a trial on Callback Filter with special interest on Reparse Points. Searching through the docs I found an event called OnReparseWithTag which is exactly what I'm looking for but there is no sample or documentation on how it works. I have created a file using FSCTL_SET_REPARSE_POINT and setting the REPARSE_GUID_DATA_BUFFER, after setting the callback and Rule for reparse tag the callback is not invoked.

Can anyone provide a sample or more information on how to use this event?

Thanks,
Humberto
#36682
Posted: 05/09/2016 16:52:56
by Humberto Aicardi (Basic support level)
Joined: 04/16/2015
Posts: 5

Searching it looks like I need to register a GUID to be used in Callback Filter so it matches my GUID at the reparse. Is this is correct how can I do this?

Thanks,
Humberto
#36684
Posted: 05/09/2016 18:53:11
by Vladimir Cherniga (EldoS Corp.)

Quote
Humberto Aicardi wrote:
Is this is correct how can I do this?

No. Reparse point callback triggers on file open request.
PS. If you don't see that event in CallbackFilter, then try to check the problem with ProcMon tool from sysinternals.com
#36697
Posted: 05/10/2016 09:03:16
by Humberto Aicardi (Basic support level)
Joined: 04/16/2015
Posts: 5

Hi,

I've checked what I'm using is:

CallbackFilter.SetRegistrationKey(regKey);

mFilter.OnOpenFileN = CbFltOpenFileN;
mFilter.OnReparseWithTag = CbFltReparseWithTagEvent;
mFilter.AddFilterCallbackRule(textPath.Text,
CbFltCallbackFlags.OpenNotify |
CbFltCallbackFlags.ReparseTagCallback
);
mFilter.ProcessFailedRequests = true;
mFilter.AttachFilter(10000);
mFilter.ReadWriteFileInPreCreatePath = false;
mFilter.FlushFilesOnClose = false;

The OpenFile gets called but the ReparseWithTag doesn't. When I execute the following code I can get the TAG:

REPARSE_GUID_DATA_BUFFER buffer = new REPARSE_GUID_DATA_BUFFER();
uint controlCode = ( FILE_DEVICE_FILE_SYSTEM << 16) | (FILE_ANY_ACCESS << 14) | (FSCTL_GET_REPARSE_POINT << 2) | METHOD_BUFFERED;
uint bytesReturned;
bool success = DeviceIoControl(
handle,
controlCode,
IntPtr.Zero,
0,
out buffer,
MAXIMUM_REPARSE_DATA_BUFFER_SIZE,
out bytesReturned,
IntPtr.Zero);

Can you provide any further help?

Thanks,
Humberto
#36699
Posted: 05/10/2016 10:58:57
by Vladimir Cherniga (EldoS Corp.)

Quote
Humberto Aicardi wrote:
mFilter.AddFilterCallbackRule(textPath.Text, CbFltCallbackFlags.OpenNotify | CbFltCallbackFlags.ReparseTagCallback );

Does it include source file path with a reprase point created ?
ReparseWithTag callback triggers on open request. With a ProcMon tool it should looks like an open request with STATUS_REPARSE returned.
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

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