SUGGESTED FIX
------- DllServer.cpp -------
*** //C/tmp/sccs.001000 Mon Jul 21 18:21:25 2008
--- DllServer.cpp Mon Jul 21 18:17:15 2008
***************
*** 476,488 ****
// before returning to the caller.
HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
if (FAILED(IsJavaPluginDefaultVM())) {
! hr = LoadMSJavaVM(riid, ppvObjOut);
} else {
! hr = _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
! if (SUCCEEDED(hr)) {
! CAxControl::SetVersionString(rclsid);
! }
}
return hr;
--- 476,503 ----
// before returning to the caller.
HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
if (FAILED(IsJavaPluginDefaultVM())) {
!
! if (IsEqualCLSID(rclsid, CLSID_JavaPlugin) ||
! IsEqualCLSID(rclsid, CLSID_NEW_DYNAMIC) ||
! ((rclsid.Data1 == 0xCAFEEFAC) && (rclsid.Data4[7] != 0xBB)) ) {
! hr = _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
! if (SUCCEEDED(hr)) {
! CAxControl::SetVersionString(rclsid);
! }
! } else {
! hr = LoadMSJavaVM(riid, ppvObjOut);
! }
} else {
! hr = _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
! if (SUCCEEDED(hr)) {
! CAxControl::SetVersionString(rclsid);
! }
}
return hr;
|
EVALUATION
When disabling the <applet> tag support through the IE's Internet Properties "Advanced" tab, we're basically setting the following registry key to 0
HKLM\\Software\\JavaSoft\\Java Plug-in\\UseJava2IExplorer
In the entry point of the jp2iexp.dll (DllGetClassObject), we currently are checking if the above registry key isn't set, we'll try to invoke MSVM without taking into account whether there's an incoming clsid as in the case when an applet is using the <object> tag. A potential fix is in additional to checking the above registry key, we should also take into account the incoming clsid before inovking MSVM. Care should be taken not to honor the redirected clsid from the <applet> tag - the static versioning clsid ending with 0xBB.
|