|
|
|
|
#1 |
|
Junior Member
Join Date: Jul 2017
Posts: 29
|
NSIS plugin via Delphi (codeoffset for function)
Hello!
I need to create plugin for NSIS installer using Delphi. I can't use C/C++, because some of the code is already Delphi-written in secondary project. I used manual - NSIS\Examples\Plugin\nsis.pas. Can someone explain me this part of implementation code? PHP Code:
But, "MyBestFunctionInScript" (value of "codeoffset") will be converted at 0 always (why StrToIntDef?). Maybe need to remove StrToIntDef on other function? In C-example I find this interface (maybe it's normal working convertion string function name at codeoffset): PHP Code:
|
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Call does not take the string name of a NSIS function.
The NSIS code needs to call GetFunctionAddress and pass the returned value to your plugin function (and it is passed as a string). Your plugin function then uses this string with Call(). nsishelper_str_to_ptr is just a internal StrToInt style function used by C plug-ins. IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2017
Posts: 29
|
thanks!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|