printf in NSIS plugin
How I can do printf-like stuff in a self made plugin? I have heard of fprintf(g_output, ... but I don't know where g_output is declared.
10 posts
I believe nsdialogs.dll has this functionality, and the source for it is available too.Originally Posted by Dafr View PostCan you explain how to call this callback from the C code?
in the nsi:int funcAddr = popint();
pushstring("Logging from plugin DDL");
extra->ExecuteCodeSegment(funcAddr - 1, 0);
Thank you.GetFunctionAddress $R0 LogText
Push $R0
MyPlugin::MyFunction
Push $R0is the same as this:
MyPlugin::MyFunction
MyPlugin::MyFunction "$R0"When using a direct plugin call, the arguments are automatically pushed onto the stack in reverse order, so in you're plugin you pop them off the stack in order. This is documented in the NSIS docs.