Skip to content
⌘ NSIS Forum Archive

Plugin question

6 posts

Vytautas#

Plugin question

I'm trying to design a plugin for NSIS and was wondering what happens when the plugin tries to pop a value that does not exist. Does an error occur or is the poped value simply null?

Vytautas
kichik#
If the stack is empty, popstring will return 1 and the buffer you've pointed to will not be changed.
Vytautas#
I was thinking more along the lines of doing it in NSIS so that it would make it easier to test plugins, e.g. clear the stack before a plugin is called to make sure that not leftover info from the stack is used.

Or maybe posibility to move the stack somewhere call the plugin, process the output and then restore the original stack. 😎 Yes, I know thats not posible but it could be a cool feature in the future???

Vytautas
kichik#
A macro can be written to Pop until there is an error and write the values into a file. Later, another macro can restore those values from the file/files.