As stated in the documentation:
The NPAPI browser plugin is basically just a DLL with multiple entry points
This means that you need to export some function from a regular DLL, which is usually done in C / C ++. Unfortunately, it is not possible to show any entry point from a simple C # dll, but look at this answer , with some effort, you can apparently fool some export with some type of message creation tool.
In any case, do not expect the transfer of too complex data structures from / to the plugin interfaces, this will be a pain. If you are interested in doing more research, the key word to use is "reverse P / Invoke," similar to direct P / Invoke, which calls a regular dll from a controlled world.
The reason C # dll cannot set "entry points" directly is because the entry point actually represents only some address inside the dll pool in order to immediately get executable assembly code. C # dlls are different types of beasts: they are just files containing an IL that is compiled "Just In Time", and, indeed, AFAIK has to compile such compilation with some OS tricks . This is the reason why the reverse P / Invoke is not stellar at all.
source share