Archive: Creating a DLL to use as a plugin


Creating a DLL to use as a plugin
I am wanting to write an NSIS plugin that will allow me to encrypt a string using Whirlpool encryption (the encryption plugins I have found don't seem to do this).

I want to write the code in Perl, and will then compile that code into a .dll using the ActiveState PerlCtrl tools.

To test this I am using the example that ActiveState provide when teaching you how to use PerlCtrl.

The script should just return a message back to the user.

The ControlName is "MyVeryOwnControl" and one of the methods is "Greet", but when I try "MyVeryOwnControl::Greet" with an NSIS script I get the error "Invalid command: MyVeryOwnControl::Greet".

I have put the .dll into the NSIS plugins folder. Is there something else I need to do to get it to run this plugin? Is there a way I can test whether or not NSIS has loaded this dll as a plugin and what methods it has found.


Hello,
as far as i know, nsis plugins can be written in c/c++ or delphi.
You can find a plugin template written in C in the Examples\plugin folder of your nsis installation.
So you have three options:
- write your own plugin in c
- write a wrapper plugin in c that calls your dll
- use the system plugin to call yout dll directly

Regards
Stefano


Thanks for the reply.

I'll have a go at using the system plugin to call my dll.