On Wed, 13 Jun 2001 19:09:54 GMT, Steven Katz <[EMAIL PROTECTED]>
wrote:
>>
>>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
Yep.
>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;
>}
>
First, the mimeTypes that you pass to RegisterPlugin should be:
NS_INLINE_PLUGIN_CONTRACTID_PREFIX "application/x-java-vm"
not just "application/x-java-vm"
If you are using NS_IMPL_NSGETMODULE, it's preprocessed into a call to
NS_NewGenericModule
(http://lxr.mozilla.org/seamonkey/source/xpcom/components/nsIGenericFactory.h#125)
Try to step through that and see if there are any errors generated.
Does your RegisterSelf even get called?