Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How To get the plugin Installation Path?

3 views
Skip to first unread message

Luca Cerutti

unread,
Dec 11, 2009, 12:03:18 PM12/11/09
to
Good Day,
I need to know how a plugin can know the path to the folder where it
is installed.

I'm targeting MicroSoft Windows as OS and as far as I know, NPAPI has
no methods to read registry values and any call to Microsoft SDK
registry functions immediately disables the plugin.

Obviously "GetCurrent" only gets the installation path of Mozilla
executable.

I need to have a installation path in order to acquire a configuration
file that gives the plugin additional info on where a custom cache
folder is located.

I'm pretty sure that ADOBE plugins use custom cache folders so there
must be a way to customize the installation as much as you want and
retrieve the information.

What I'm missing. I have to integrate NPAPI with XPCOM... and how?

Please, I have to go a step further from the basic "Hello World"
plugin... and I'm getting a little pissed at the obscure documentation
and useless examples...

Georg Fritzsche

unread,
Dec 11, 2009, 12:21:24 PM12/11/09
to
On Dec 11, 6:03 pm, Luca Cerutti <luca.cerutti...@gmail.com> wrote:
> Obviously "GetCurrent" only gets the installation path of Mozilla
> executable.

You can use GetModulePath(GetModuleHandle(), ...) on Windows.

Regards,
Georg

Luca Cerutti

unread,
Dec 14, 2009, 8:59:43 AM12/14/09
to
On 11 Dic, 18:21, Georg Fritzsche <georg.fritzs...@googlemail.com>
wrote:

Thank you Greg...
I must also thank Martin that privately pointed to me the fact that
registry functions SHOULD work.
Checking my code again I've discovered a bug... the weird fact is that
the error shoud have been severe enough to cause a crash, but instead
it simply caused the plugin to not load, thus making me believe that
was some security issue.

So I have to correct my previous statement: NPAPI plugins CAN read the
registry. Sorry for the misinformation.

0 new messages