In article <[EMAIL PROTECTED]>, Sean Echevarria says...
>
>On Wed, 13 Jun 2001 15:44:44 GMT, Steven Katz <[EMAIL PROTECTED]>
>wrote:
>>
>>I don't know what regxpcom is.  All the information I have so far indiactes that
>>I only need to put it in the "components" directory.
>
>autoregistration is only enabled in debug builds.  In a release build
>you need to either delete bin\component.reg and bin\components\xpti*
>
>Or run regxpcom on your dll:
>regxpcom path\to\your\dll
>
>

Thanks!!!  I'll give this a try.


>>>>2) I can't get the development build to recognize it as something to use to run
>>>>applets (defined with the APPLET tag or the EMBED tag).  It only recognizes it
>>>>as something to use for javascript request (such as typing
>>>>javascript:java.lang.System.out.println("sss") in the location box)
>>>
>>>Are you getting error messages related to the embed or applet
>>>instantiations?
>>>
>>
>>So far I can only say for certin that it fails with APPLET (I get a dialog box
>>saying there is no plugin for application/x-java-vm.
>
>In your self-registration method, is RegisterPlugin() returning
>success?
>
>

I'm not sure what you are asking here.  What is the "self-registration method"?
Do you mean a function that is given as the 5th initializer of the component
structure.  If that is the case, I did write one of those, but had very little
success.  What ended up happening was that instead of bringing up a dialog box
saying it didn't have a plugin.  It just did nothing.  Here is the code (I
guessed at what a proper implementation would be):

NS_METHOD JavaPluginFactory5::RegisterSelf(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info) {
nsIPluginManager2 *pm;
nsIServiceManager * sm;
nsServiceManager::GetGlobalServiceManager(&sm);

nsresult rr = sm->GetService(kCPluginManagerCID, kIPluginManager2IID,
(nsISupports
** )&pm);


const char * mimeTypes[] = { "application/x-java-vm" };
const char * mimeDesc[] = { "Java(tm) Plug-in" };
const char * fileext[] = { ".class" };

pm->RegisterPlugin(kJavaPluginCID,"Java
Plugin","Nothing",mimeTypes,mimeDesc,fileext,1);

NS_RELEASE(pm);
return NS_OK;
}





Reply via email to