Skip to content
⌘ NSIS Forum Archive

How to use .net library in NSIS Script

8 posts

valentz142#

How to use .net library in NSIS Script

Hello all,

I have googled for a few day, read wiki, read forum but I cannot find what I need. I need your help.

I have create two function(sayhello and sayhellowithparam for example) in my custom .net library (example mydll.dll).

How to call this function from NSIS? Is it any plugin that needed? Since I have tried to use:
1. system::call "mydll::sayhello(v) t .r0"
2. system::call "mydll::sayhellowithparam(t 'helloworld') t .r0"
3. i put it in $plugindir, and load it just like a plugin
4. I have already tried to use regasm first or just only use setoutpath for point 1 and 2

Please help...

🙁
Afrow UK#
This has already been mentioned before. You can't call a .NET library with the System plugin.

-Stu
kichik#
Create a non-managed DLL that calls that .NET DLL. You could also try creating a non-managed exported function in the .NET DLL itself, but I don't know if that's possible.
valentz142#
Thank you,

Perhaps, I will combine all suggestion that i get.
Create an executable that load .net dll and use exectostack to get its return.

I'll try..

Thank you,
Backland#
It might be easier to create your own NSIS plugin to call the .NET library, instead of an executable so you might want to do that.
kesavan#
Hello,

I am having same issue.. I am new to NSIS.

It would be helpful, if you provide step by step guide to call the .net dll in NSIS script.

Please advise.

Thanks in advance.

Regards,
Kesavan
Afrow UK#
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Stu