I'm having a very strange issue when building a plugin in Borland 5.5
Here's some simplified code to illustrate the issue:
#include "nsis_ansi\pluginapi.h"
#define NSISFUNC(name) extern "C" void __declspec(dllexport) name(HWND hWndParent, int string_size, char* variables, stack_t** stacktop, extra_parameters* extra)
extra_parameters* ep;
HANDLE g_hInstance;
extern volatile stack_t **g_stacktop;
extern volatile char *g_variables;
int cool()
{
int i = 0;
return i;
}
NSISFUNC(str_length)
{
MessageBox(0,"Hi!",0,0);
cool();
ExitProcess(0);
} For some reason, when I call other functions within the plugin, NSIS either does not execute the plugin function correctly, or the plugin function is corrupted in some way, because nothing happens.Calling WinAPI functions work fine.
With this code:
#include "nsis_ansi\pluginapi.h"
#define NSISFUNC(name) extern "C" void __declspec(dllexport) name(HWND hWndParent, int string_size, char* variables, stack_t** stacktop, extra_parameters* extra)
extra_parameters* ep;
HANDLE g_hInstance;
extern volatile stack_t **g_stacktop;
extern volatile char *g_variables;
int cool()
{
int i = 0;
return i;
}
NSISFUNC(str_length)
{
MessageBox(0,"Hi!",0,0);
ExitProcess(0);
} (not calling the function cool()), it executes perfectly and I see the messagebox.I tried changing the calling convention of the function to cdecl,stdcall, nothing has worked.
Current build options: -u- (not include _ symbol before symbol names), -g0 (ignore max # of warnings in code)
Any ideas?