EldoS | Feel safer!

Software components for data protection, secure storage and transfer

problem adding filters from CbFltFilterAttachToFsVolumeEvent

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#18074
Posted: 11/03/2011 17:28:54
by Ophir Yoktan (Basic support level)
Joined: 08/21/2011
Posts: 7

I'm trying to add a rule from the CbFltFilterAttachToFsVolumeEvent event handler. but it appears to fail (I don't get an exception, but the rule isn't called)

the handler consists of the lines:
Code
Sender->AddFilterCallbackRule((VolumeNameString+wstring(_T("\\*.*"))).c_str(),
    CallbackFilter::OpenCallback);
Sender->SetOnOpenFileC(CbFltOpenFileC);


any ideas?
#18081
Posted: 11/04/2011 00:52:47
by Eugene Mayevski (EldoS Corp.)

Is the code you've quoted actually executed ? Can it happen that the event handler is not called at all?


Sincerely yours
Eugene Mayevski
#18083
Posted: 11/04/2011 01:25:54
by Ophir Yoktan (Basic support level)
Joined: 08/21/2011
Posts: 7

Solved:

I noticed that the line:
Code
Sender->AddFilterCallbackRule(...)

succeeded (returning true)
but
Code
Sender->SetOnOpenFileC(CbFltOpenFileC);

blocked.

I moved it from the CbFltFilterAttachToFsVolumeEvent event handler to the main application, and it works now.

could it be that SetOnOpenFileC shouldn't be called after AttachFilter?
#18084
Posted: 11/04/2011 01:42:47
by Eugene Mayevski (EldoS Corp.)

I can't check with developers now but it's likely that changing event handlers from the event handler is intentionally blocked (to avoid possible deadlocks, probably).


Sincerely yours
Eugene Mayevski
#18087
Posted: 11/04/2011 02:54:52
by Vladimir Cherniga (EldoS Corp.)

Quote
could it be that SetOnOpenFileC shouldn't be called after AttachFilter?

Exactly. Event handlers must be initialized before AttachFilter() call.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 2099 times

Number of guests: 2, 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!