I need to read a version of DLL in Java. Here's the scenario .
I have a webapp which installs a utility . When user comes from other version we make a ActiveX call to our dll ( already installed ) and then check version with our server version, if versions are different then we write a <object> tag for new version to be installed. Now problem is that to check version of client utility we load the dll and make a native call from java applet to a method in dll which returns version of DLL. Now if they mismatch setup of new utility starts but the original DLL is not unloaded and hence sometimes it asks for system restart as repalced dll is in memory. Windows takes its own time to unload the dll for some reason, hence behaviour is very ambiguous as sometimes it works and sometimes on other system it asks for a restart.
I decided that i will get dll version without loading dll via activex . for javascript its as simple as ..
var v= new ActiveXObject("Scripting.filesystemobject");
var c = v.GetVersion("path to dll");
This works fine but i cant run this from browser as IE won't allow JS to access local file system. However my JavaApplets are signed and they can access local file system. I need same functionality from Java . Is it possible to write out a javascript run it and make it return variable back to Java program somehow ??
I know scrrun.dll contains FileSystemObject in windows, any idea if i can call it using JNI and access its GetVersion(dllpath) from within Java ???
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









