Background
I am working on an application where I need to query for all the files available on my harddisk using java. As performance is a major requirement, I have written a native application which accesses the windows Master File Table ($MBT)
for all the valid file entries.
I am planning to modify the native as a windows service (running with admin privileges.. needed for accessing MFT) and then use my user mode java application to contact it via some IPC technique (specifically shared memory or named pipe or sockets... need to evaluate).
The target application is windows specific and java is used for text processing (I know python/perl are good at it but haven't used them for long time).
Questions
Now my question are -
- Whether it is possible to query a privileged windows service from a limited user level application?
- If not what could be the workaround to achieve this?
- I think sockets could be the possible IPC mechanism as other two would fail with
Access Denied
. Am I correct in assuming that? - Is converting the native code to JNI/DLL and then using is correct over what I am planning? But in that case I have to start my java app with admin privilege by having a custom manifest file.
Platform
- Windows 7 Enterprise
- Visual Studio 2012 (for native $MFT access)
- JDK build 1.7.0_25-b17
Thanks