Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 6th November 2013, 11:38   #1
tunpishuang
Junior Member
 
Join Date: Nov 2013
Posts: 1
How can i call a dll that import another dll using NSIS system plugin

Hey guys, I am newbie of NSIS installer. I gotta say NSIS deployment is awesome . but lately I am encountered a problem.

I am using NSIS script to call let's say A.dll which compiled using Visual C++ and export some C functions. and A.dll import B.dll. So I extract them (A.dll and B.dll) to $PLUGINSDIR at the very beginning of installation.

After that I call System::call to call let's say "test()" of A.dll. but It alway return "error". I also did a test removing import of B.dll and "test()" works and return the value of what I expected.

here is the code:
code:

;extract dll file
InitPluginsDir
SetOutPath $PLUGINSDIR
File "A.dll"
File "B.dll"



...........

;call it
code:
System::Call "$PLUGINSDIR\A::test() i.r0"


$0 return "error"

after removing import of B.dll and re-compile A.dll. test() works fine.

Can anybody explain How can i call a dll that import another dll using NSIS system plugin. Thanks in advance. sorry for the poor English. hope you guys understand what I mean.
tunpishuang is offline   Reply With Quote
Old 6th November 2013, 20:00   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Make sure the current/working directory is set to $PLUGINSDIR before calling your DLL (i.e. use SetOutPath $PLUGINSDIR) otherwise it won't find the other DLL.

http://msdn.microsoft.com/en-us/libr...p_applications

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
dll, nsis, plugins

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