lloydtech
15th March 2011, 14:48
Hi,
I am trying to write a new plug-in. The sample plugin source is given below.
#include "Windows.h"
#include "nsis/pluginapi.h" // nsis plugin
#pragma comment(lib,"nsis/pluginapi.lib")
HINSTANCE g_hInstance;
HWND g_hwndParent;
void __declspec(dllexport) InitStorage(HWND hwndParent, int string_size,char *variables, stack_t **stacktop,extra_parameters *extra)
{
g_hwndParent=hwndParent;
EXDLL_INIT();
{
}
}
BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
{
return TRUE;
}
This plugin is compiled using MS Visual Studio 2010, and put in the plugins directory of NSIS. But when the SCRIPT is compiled with
StorageNSISPlugin::InitStorage
it returns an error "Invalid command StorageNSISPlugin::InitStorage". StorageNSISPlugin is the dll name of the plug-in. All other plugins I download from the NSIS web site is working properly (I am using the prebuilt plugins).
What could be the reason? How can I resolve this?
Thanks,
Lloyd
I am trying to write a new plug-in. The sample plugin source is given below.
#include "Windows.h"
#include "nsis/pluginapi.h" // nsis plugin
#pragma comment(lib,"nsis/pluginapi.lib")
HINSTANCE g_hInstance;
HWND g_hwndParent;
void __declspec(dllexport) InitStorage(HWND hwndParent, int string_size,char *variables, stack_t **stacktop,extra_parameters *extra)
{
g_hwndParent=hwndParent;
EXDLL_INIT();
{
}
}
BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
{
return TRUE;
}
This plugin is compiled using MS Visual Studio 2010, and put in the plugins directory of NSIS. But when the SCRIPT is compiled with
StorageNSISPlugin::InitStorage
it returns an error "Invalid command StorageNSISPlugin::InitStorage". StorageNSISPlugin is the dll name of the plug-in. All other plugins I download from the NSIS web site is working properly (I am using the prebuilt plugins).
What could be the reason? How can I resolve this?
Thanks,
Lloyd