Old 31st January 2008, 04:55   #1
ashley_desilva
Junior Member
 
Join Date: Jan 2008
Posts: 5
Question How can I use a C# DLL in NSIS

Is it possible to use the C# DLL in NSIS? If so how? are there any other alternatives.
ashley_desilva is offline   Reply With Quote
Old 31st January 2008, 07:35   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
http://nsis.sourceforge.net/Docs/Chapter2.html#2.6

http://nsis.sourceforge.net/Calling_...tem.dll_plugin

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 31st January 2008, 09:25   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can't call .NET DLL's with System plug-in IIRC.
You will have to make an exe istead and call it with nsExec::ExecToStack to get its output.

Stu
Afrow UK is offline   Reply With Quote
Old 31st January 2008, 12:49   #4
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
IMHO better do NOT use a DLL in an installer that depends on .NET, please write a native DLL in C++, or Delphi for the Win32API.

TIP:
Better refrase your question e.g.
"I need my nSIS based installer to do XYZ, how can I best do that?"

then maybe we can help you proposing an alternative solution to your C# DLL issue.

"Just do it"
onad is offline   Reply With Quote
Old 31st January 2008, 22:22   #5
ashley_desilva
Junior Member
 
Join Date: Jan 2008
Posts: 5
Thanks a lot for the useful feedback guys. I am new to NSIS, so I really appreciate your advice.
ashley_desilva is offline   Reply With Quote
Old 26th June 2008, 16:20   #6
kesavan
Junior Member
 
Join Date: May 2008
Posts: 2
hello All,

I am having c# dll(C# class library project by using vs 2005). I want to call the method in NSIS Script.

I am finding the solution and its very hard to find the solution.

Please provide any sample source codes to call the C# dll using NSIS Script.(I am new to NSIS Script )

Kindly help me!!

Thanks in Advance.

Regards,
Kesavan
kesavan is offline   Reply With Quote
Old 26th June 2008, 17:59   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Did you miss my post above?

Stu
Afrow UK is offline   Reply With Quote
Old 26th June 2008, 18:13   #8
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
I don't know if that is possible, but maybe you can write a NSIS plugin DLL in C++ and use that as a wrapper to load/call your C# DLL. At least I know it is possible the other way around (call C++ DLL with a wrapper DLL from C# application). In case it's NOT possible, you'll have to create C# executable that calls your C# DLL. You can run the EXE as suggested by Afrow UK. But anyway you will have to make sure the user has the .NET framework installed first...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI

Last edited by LoRd_MuldeR; 26th June 2008 at 19:06.
LoRd_MuldeR is offline   Reply With Quote
Old 13th August 2008, 08:20   #9
claesabrandt
Member
 
claesabrandt's Avatar
 
Join Date: Aug 2008
Location: Denmark
Posts: 54
I have posted a solution on how to call a managed .NET DLL from NSIS. See my post here: http://forums.winamp.com/showthread.php?s=&threadid=295881

Last edited by claesabrandt; 13th August 2008 at 08:52.
claesabrandt is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump