EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Troubleshooting callbacks into Java application

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#9161
Posted: 03/06/2009 02:23:52
by Edwin Babadaglian (Basic support level)
Joined: 01/19/2009
Posts: 4

Greetings.

I'm currently developing a Java application that will handle callback processing, which requires the calls to flow through Java Native Interface (JNI). For the moment, I'm only working with notifications and I've observed that so far that they all seem to work except for the following:

rename, delete, close and set_sizes.

These force application process to crash after 5 calls and I'm curious if there is something in common with their implementation, compared to all the other functions, that might help identify a cause.


Thank you for any help. -Edwin
#9167
Posted: 03/06/2009 04:51:47
by Vladimir Cherniga (EldoS Corp.)

Hi,
please specify which cbfltapi interface did you use ? Could you reproduce such errors with FileMon or BaseFilter samples ?
#9168
Posted: 03/06/2009 08:23:58
by Edwin Babadaglian (Basic support level)
Joined: 01/19/2009
Posts: 4

Hello Vladimir.

I was unable to observe these errors from FileMon, so my assumption so far is that the problem lies somewhere in the JNI space. I'm currently getting some help to validate this assumption, but in case I'm wrong I thought to ask some questions here.

The driver version I'm working with is 1.0.13.35 and the following callbacks are exhibiting errors:

OnCloseFileN
OnCanFileBeDeletedN
OnRenameOrMoveFileN
OnSetAllocationSizeN

I built a small wrapper-DLL to convert CallbackFilter API's to function calls. I've attached the source for it with this reply for your reference. As another test, I modified FileMon to operate through this wrapper-DLL and it seems to work fine as well.


[ Download ]
#9201
Posted: 03/10/2009 08:20:34
by Vladimir Cherniga (EldoS Corp.)

There is a beta build of CallbackFilter 1.1 available. Try check your code with this version.
#9220
Posted: 03/11/2009 09:11:22
by Edwin Babadaglian (Basic support level)
Joined: 01/19/2009
Posts: 4

It appears that the symptoms were caused by a calling convention error in the JNI layer. Switching from 'stdcall' to 'cdecl' seemed to work.

Thanks again. -Edwin
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

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