Old 1st September 2010, 19:47   #1
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
working with dll exported functions ...

Hi all.

i have some questions about this, please any help:

First, i need use System.dll to call unrar.dll ?, so i put down some functions of this plugin but i need some functions, not all really?, to extract contents of RAR file.

- unrar::RARCloseArchive
- unrar::RARGetDllVersion
- unrar::RAROpenArchive
- unrar::RAROpenArchiveEx
- unrar::RARProcessFile
- unrar::RARProcessFileW
- unrar::RARReadHeader
- unrar::RARReadHeaderEx
- unrar::RARSetCallback
- unrar::RARSetChangeVolProc
- unrar::RARSetPassword
- unrar::RARSetProcessDataProc
- unrar::___CPPdebugHook

I read about the plugin http://nsis.sourceforge.net/Calling_...tem.dll_plugin

But i confused about how to put first in the script... :s
thanatos83 is offline   Reply With Quote
Old 3rd September 2010, 15:23   #2
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
You're not really using System to call your DLL here.
CallInstDLL is the old way of calling NSIS plugins.

You should use System::Call to call unrar.dll function. It will requires you to specify the prototype of the function using System specific syntax (see System plugin help file)
Wizou is offline   Reply With Quote
Old 5th September 2010, 04:50   #3
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Download this file:
http://www.rarlab.com/rar/UnRARDLL.exe
And extract it using WinRAR, read unrardll.txt. It shows you the structrue and functions of unrar.dll, and the constants are defined in unrar.h.
jiake is offline   Reply With Quote
Old 5th September 2010, 11:03   #4
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
OK thanks...

So it's more easy with unrar.exe, but progress bar jumps when you use it with nsExecToLog.

Is there anyway to set a proper progress bar with this compressor, for example when the compressor is extracting a file?
thanatos83 is offline   Reply With Quote
Old 5th September 2010, 18:22   #5
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
No.

Note: Even when NSIS is extracting a file by itself, the progress bar is not moving (only a percentage of the progress is displayed)
Wizou 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