Call .NET DLL methods plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 1: Line 1:
{{PageAuthor|claesabrandt}}
{{PageAuthor|claesabrandt}}
== NSIS plug-in for calling methods in .NET DLLs. ==
NSIS forum [http://forums.winamp.com/showthread.php?s=&threadid=295881 thread]
== Description ==


This is a NSIS plug-in, that can call methods in your managed .NET DLL.
This is a NSIS plug-in, that can call methods in your managed .NET DLL.


While the plug-in is fully functional, it still undergoes some development and changes.
While the plug-in is fully functional, it still undergoes some development and changes.
Version 0.1 of the plugin is available here <attach>CLR.zip</attach> for testing purposes.
What is underway and soon to be included:
* support for callbacks
* a much cleaner way of specifying method parameters
* both native NSIS plugin and plugin called via System::Call
* source code, when it done and has been cleaned up
I previously had a description on how to write your own wrapper that loads .NET DLL methods. As it contained some errors I have replaced it with this ready-made plugin. When the source is released for this plugin, you can use it to write your own custom .NET wrapper, if you need some special features not available through this plug-in.


Sample NSIS script calling a method in a .NET DLL:
Sample NSIS script calling a method in a .NET DLL:
Line 25: Line 16:
</highlight-nsis>
</highlight-nsis>


NSIS forum [http://forums.winamp.com/showthread.php?s=&threadid=295881 thread]
== Coming soon ==
 
* support for callbacks
* a much cleaner way of specifying method parameters
* both native NSIS plugin and plugin called via System::Call
 
== Download ==
 
Version 0.1 of the plugin is available here <attach>CLR.zip</attach> for testing purposes.


[[Category:Plugins]]
[[Category:Plugins]]

Revision as of 18:34, 20 August 2008

Author: claesabrandt (talk, contrib)


NSIS forum thread

Description

This is a NSIS plug-in, that can call methods in your managed .NET DLL.

While the plug-in is fully functional, it still undergoes some development and changes.

Sample NSIS script calling a method in a .NET DLL:

SetOutPath $PLUGINSDIR
File "SomeAssembly.dll" ; some test .NET assembly
File "CLR.dll" ; this plugin
System::Call `CLR::Call(w 'SomeAssembly.dll::SomeNamespace::SomeClass::SomeMethod( \
  "some string value",12,"15,8",false)') w .r0`

Coming soon

  • support for callbacks
  • a much cleaner way of specifying method parameters
  • both native NSIS plugin and plugin called via System::Call

Download

Version 0.1 of the plugin is available here CLR.zip (35 KB) for testing purposes.